farmersDaughter.js

個人創作分享區

Moderator: loio

User avatar
BlackWolf
劇院合夥人
Posts: 2195
Joined: 2006年 Jun 8日, 04:09

farmersDaughter.js

Unread post by 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);
}
Post Reply

Return to “文藝迴廊”