Lines Matching refs:monster
74 var monster = MyGame.Sample.Monster.getRootAsMonster(buf);
77 assert.equal(monster.mana(), 150);
78 assert.equal(monster.hp(), 300);
79 assert.equal(monster.name(), 'Orc');
80 assert.equal(monster.color(), MyGame.Sample.Color.Red);
81 assert.equal(monster.pos().x(), 1.0);
82 assert.equal(monster.pos().y(), 2.0);
83 assert.equal(monster.pos().z(), 3.0);
86 for (var i = 0; i < monster.inventoryLength(); i++) {
87 assert.equal(monster.inventory(i), i);
93 for (var i = 0; i < monster.weaponsLength(); i++) {
94 assert.equal(monster.weapons(i).name(), expectedWeaponNames[i]);
95 assert.equal(monster.weapons(i).damage(), expectedWeaponDamages[i]);
99 assert.equal(monster.equippedType(), MyGame.Sample.Equipment.Weapon);
100 assert.equal(monster.equipped(new MyGame.Sample.Weapon()).name(), 'Axe');
101 assert.equal(monster.equipped(new MyGame.Sample.Weapon()).damage(), 5);