Game Development Reference
In-Depth Information
enemyAttackWait:6000,
powerIncreaseAwarded:0,
defenseIncreaseAwarded:0,
coinsAwarded:0,
HPEarned:0
},
{
type:'field',
enemies:['minotaur1', 'minotaur2', 'sorcerer1', 'sorcerer2',
'minotaur2', 'troll2', 'sorcerer2',
'minotaur2', 'minotaur2'],
enemyStreak:3,
enemyAttackWait:8000,
powerIncreaseAwarded:1,
defenseIncreaseAwarded:0,
coinsAwarded:3,
HPEarned:0
},
{
type:'boss',
boss:'octopus',
enemyStreak:1,
enemyAttackWait:4000,
powerIncreaseAwarded:1,
defenseIncreaseAwarded:0,
coinsAwarded:3,
HPEarned:0
}
];
GameData.attackPower = {
attack:0,
fire:4,
earth:7,
lightning:10
}
GameData.magicCosts = {
potion:2,
fire:5,
earth:7,
lightning:10
}
After the level data, the last two objects pertain to magic items. The attackPower property lists the extra damage
caused from each magic item when cast against an enemy. The last object, magicCosts , is used for building the magic
shop after a level is complete. This shop will be covered in the “Creating the Magic Shop” section.
Search WWH ::




Custom Search