-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
140 lines (138 loc) · 5.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!doctype html>
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>ログ・ホライズンTRPG エネミー諸数値計算ツール</title>
<!-- CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<div class="container">
<h3 class="text-center">ログ・ホライズンTRPG<br/>エネミー諸数値計算ツール</h3>
<div id="enemyApp" v-cloak>
<div class="container">
<hr class="mt-2"/>
<div class="row">
<div class="col-sm-2 form-group">
<label for="cr">キャラクターランク</label>
<select id="cr" class="form-control" v-model="input.cr" @change="changeCr(input.cr)">
<option v-for="cr in setting.crList" :value="cr">CR{{ cr }}</option>
</select>
</div>
<div class="col-sm-4 form-group">
<label for="type">エネミータイプ</label>
<select id="type" class="form-control" v-model="input.type" @change="changeType(input.type)">
<option v-for="type in setting.typeList" :value="type">{{ type.label }}</option>
</select>
</div>
<div class="col-sm-2 form-group">
<label for="rank">ランク</label>
<select id="rank" class="form-control" v-model="input.rank" @change="changeRank(input.rank)">
<option v-for="rank in setting.rankList" :value="rank">{{ rank.label }}</option>
</select>
</div>
<div class="col-sm-2 form-group">
<label for="race">大種族</label>
<select id="race" class="form-control" v-model="input.race" @change="changeRace(input.race)">
<option v-for="race in setting.raceList" :value="race">{{ race.label }}</option>
</select>
</div>
<div class="col-sm-2 form-group">
<label for="popularity">知名度</label>
<select id="popularity" class="form-control" v-model="input.popularity" @change="changePopularity(input.popularity)">
<option v-for="popularity in setting.popularityList" :value="popularity">{{ popularity.label }}</option>
</select>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12">
<h5>
{{ enemy.getType().label }} CR:{{enemy.getCharacterRank()}}
<template v-for="tag in enemy.getTags()">
<span class="badge badge-secondary">{{ tag }}</span>
</template>
</h5>
<p>{{enemy.getFunction()}}</p>
<p></p>
</div>
<div class="col-sm-12 mt-3">
<div>▼能力値</div>
<div>【STR】{{enemy.getStr()}} 【DEX】{{enemy.getDex()}} 【POW】{{enemy.getPow()}} 【INT】{{enemy.getInt()}}</div>
<div>【回避】{{enemy.getAvoid()}} 【抵抗】{{enemy.getResist()}} 【物理防御力】{{enemy.getPhysicalDefense()}} 【魔法防御力】{{enemy.getMagicDefense()}}</div>
<div>【最大HP】{{enemy.getHitPoint()}} 【ヘイト倍率】{{enemy.getHate()}} 【行動力】{{enemy.getAction()}} 【移動力】{{enemy.getMove()}}</div>
<div>【識別難易度】{{enemy.getDifficulty()}}</div>
</div>
<div class="col-sm-12 mt-3">
<div>▼特技</div>
<template v-for="skill in enemy.getSkills()">
<div>{{ skill.toString() }}</div>
<div class="remarks" v-if="skill.getRemarks() != null">※{{ skill.getRemarks() }}</div>
</template>
</div>
<div class="col-sm-12 mt-3">
<div>▼ドロップ品</div>
ドロップ期待値:{{enemy.getGold()}}G
</div>
</div>
</div>
</div>
<div class="mb-5"></div>
</main>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script src="./dist/lhz_enemy.js"></script>
<script>
var enemyApp = new Vue({
el: '#enemyApp',
data: {
setting: {
typeList: EnemyType.getValues(),
crList: [30],
popularityList: Popularity.getValues(),
rankList: EnemyRank.getValues(),
raceList: EnemyRace.getValues(),
},
input: {
cr: null,
type: null,
popularity: null,
rank: null,
race: null,
},
enemy: null,
},
methods: {
changeCr(cr) {
this.enemy.setCharacterRank(cr);
},
changeType(type) {
this.enemy.setType(type);
},
changePopularity(pop) {
this.enemy.setPopularity(pop);
},
changeRank(rank) {
this.enemy.setRank(rank);
},
changeRace(race) {
this.enemy.setRace(race);
},
},
created() {
this.enemy = new Enemy();
this.input.cr = this.enemy.getCharacterRank();
this.input.type = this.enemy.getType();
this.input.popularity = this.enemy.getPopularity();
this.input.rank = this.enemy.getRank();
this.input.race = this.enemy.getRace();
for (let i = 0; i < 30; i++) {
this.setting.crList[i] = i + 1;
}
}
});
</script>
</body>
</html>