diff --git "a/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/index.js" "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/index.js" index 1feb79a..9353d7c 100644 --- "a/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/index.js" +++ "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/index.js" @@ -11,7 +11,6 @@ const samurai = { ...base, name: 'サムライ', description: 'てきをみつけると、ざんげきでこうげき', - module: null, // 改造ボタン用のコードへのパス. null の場合は改造不可 module: './samurai.js', icon: './samurai.png' // アセットのアイコンへのパス } @@ -20,11 +19,18 @@ const hunter = { ...base, name: 'ハンター', description: 'てきをみつけると、弓矢でこうげき', - module: null, // 改造ボタン用のコードへのパス. null の場合は改造不可 module: './hunter.js', icon: './hunter.png' // アセットのアイコンへのパス } +const mage = { + ...base, + name: 'メイジ', + description: 'てきをみつけると、かえんでこうげき', + module: './mage.js', + icon: './mage.png' // アセットのアイコンへのパス +} + const scopeCreate = [ // スコープの参照を配列で指定する. null の場合は常に表示 sco.ゲームがはじまったとき @@ -58,6 +64,12 @@ module.exports = [ insert: './hunter-create.js', // 追加ボタン用のコードへのパス. null の場合は追加不可 thumbnail: 'https://i.gyazo.com/8646c38f64bc2ce4cb94e9ff222b96bf.gif' // サムネイル画像 }, + { + ...mage, + scopes: scopeCreate, + insert: './mage-create.js', // 追加ボタン用のコードへのパス. null の場合は追加不可 + thumbnail: 'https://i.gyazo.com/981b788134e39111cb541f4cf5a1855d.gif' // サムネイル画像 + }, // 「◯◯の中身」ファイルに入るコード { ...samurai, @@ -68,5 +80,10 @@ module.exports = [ ...hunter, scopes: scopeSummon, insert: './hunter-summon.js' // 追加ボタン用のコードへのパス. null の場合は追加不可 + }, + { + ...mage, + scopes: scopeSummon, + insert: './mage-summon.js' // 追加ボタン用のコードへのパス. null の場合は追加不可 } ] diff --git "a/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage-create.js" "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage-create.js" new file mode 100644 index 0000000..e46097e --- /dev/null +++ "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage-create.js" @@ -0,0 +1 @@ +つくる('メイジ', 3, 4, 'map1', むき.した) diff --git "a/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage-summon.js" "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage-summon.js" new file mode 100644 index 0000000..bdf9795 --- /dev/null +++ "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage-summon.js" @@ -0,0 +1 @@ +this.しょうかんする('メイジ', 1, 0) diff --git "a/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage.js" "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage.js" new file mode 100644 index 0000000..3c89337 --- /dev/null +++ "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage.js" @@ -0,0 +1,87 @@ +import '../game' + +rule.つくられたとき(async function() { + await this.みためをかえる('メイジ') + this.なかま = なかま.プレイヤー + this.たいりょく = 3 + this.こうげきりょく = 1 + this.みえるきょり = 3 + this.みえるはんい = 1 + + /*+ つくられたとき */ +}) + +rule.つねに(async function() { + await this.おいかける('プレイヤー') + await this.てきをみつける() + + /*+ つねに */ +}) + +rule.みつけたとき(async function(item) { + if (this.てきかどうか(item)) { + await this.まつ(1) + await this.こうげきする() + await this.うしろにあるく() + await this.てきをみつける() + await this.あるく() + await this.てきをみつける() + + /*+ みつけたとき */ + } + /*+ みつけたとき */ +}) + +rule.こうげきするとき(async function() { + this.しょうかんする('赤色のうず', 3, 1) + this.しょうかんする('赤色のうず', 3, 0) + this.しょうかんする('赤色のうず', 3, -1) + + /*+ こうげきするとき */ +}) + +rule.ぶつかったとき(async function(item) { + if (item.は('プレイヤー')) { + /*+ ぶつかったとき */ + } + /*+ ぶつかったとき */ +}) + +rule.たおされたとき(async function() { + /*+ たおされたとき */ +}) + +rule.こうげきされたとき(async function(item) { + if (item.は('プレイヤー')) { + /*+ こうげきされたとき */ + } + /*+ こうげきされたとき */ +}) + +rule.メッセージされたとき(async function(item) { + /*+ メッセージされたとき */ +}) + +rule.じかんがすすんだとき(async function() { + /*+ じかんがすすんだとき */ +}) + +rule.すすめなかったとき(async function() { + /*+ すすめなかったとき */ +}) + +rule.しょうかんされたとき(async function(item) { + /*+ しょうかんされたとき */ +}) + +rule.あるいたとき(async function() { + /*+ あるいたとき */ +}) + +rule.へんすうがかわったとき(async function() { + /*+ へんすうがかわったとき */ +}) + +rule.タップされたとき(async function() { + /*+ タップされたとき */ +}) diff --git "a/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage.png" "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage.png" new file mode 100644 index 0000000..02bb889 Binary files /dev/null and "b/src/assets/\343\201\252\343\201\213\343\201\276\343\202\255\343\203\243\343\203\251/mage.png" differ