farmersDaughter.js

個人創作分享區

版主: loio

回覆文章
頭像
BlackWolf
劇院合夥人
文章: 2195
註冊時間: 2006年 6月 8日, 04:09

farmersDaughter.js

未閱讀文章 BlackWolf »

// Hack and Slash. Kill all goblins to save the farmer's daughter.
function farmersDaughter() {
const edelwine = characters.get('edelwine').equip('club', 'grass fork');
const coldstone = characters.get('coldstone').equip('leather armor', 'axe', 'crossbow');
const goblins = goblinDan().gen();
const action = Action();

while((edelwine.status() !== 'dead' && coldstone.status() !== 'dead') || goblins !== [] || event.trigger() === null) {
// Goblins attack first!
goblins.foreach(action.rand, edelwine, coldstone);
// Edelwine and Coldstone fight back. Edelwine: "Lady first." Coldstone: "Shut up, Mouth Monster!"
action.rand(coldstone, goblins.getTarget());
action.rand(edelwine, goblins.getTarget());
}

// And this is the end.
return getEnding(edelwine, coldstone, goblins);
}
回覆文章

回到「文藝迴廊」