Lines Matching refs:monster
81 var monster = MyGame.Example.Monster.getRootAsMonster(bb);
83 monster.mutate_hp(120);
84 assert.strictEqual(monster.hp(), 120);
86 monster.mutate_hp(80);
87 assert.strictEqual(monster.hp(), 80);
89 var manaRes = monster.mutate_mana(10);
98 var monster = MyGame.Example.Monster.getRootAsMonster(bb);
100 assert.strictEqual(monster.hp(), 80);
101 assert.strictEqual(monster.mana(), 150); // default
103 assert.strictEqual(monster.name(), 'MyMonster');
105 var pos = monster.pos();
115 assert.strictEqual(monster.testType(), MyGame.Example.Any.Monster);
117 assert.strictEqual(monster.test(monster2) != null, true);
120 assert.strictEqual(monster.inventoryLength(), 5);
122 for (var i = 0; i < monster.inventoryLength(); i++) {
123 invsum += monster.inventory(i);
128 var invArr = monster.inventoryArray();
134 var test_0 = monster.test4(0);
135 var test_1 = monster.test4(1);
136 assert.strictEqual(monster.test4Length(), 2);
139 assert.strictEqual(monster.testarrayofstringLength(), 2);
140 assert.strictEqual(monster.testarrayofstring(0), 'test1');
141 assert.strictEqual(monster.testarrayofstring(1), 'test2');
143 assert.strictEqual(monster.testbool(), false);
198 var monster = MyGame.Example.Monster.getRootAsMonster(bb);
199 assert.strictEqual(monster.name(), json.name);
200 …assert.deepEqual(new Buffer(monster.name(flatbuffers.Encoding.UTF8_BYTES)), new Buffer(json.name));
201 assert.strictEqual(monster.testarrayoftablesLength(), json.testarrayoftables.length);
203 var value = monster.testarrayoftables(i);
207 assert.strictEqual(monster.testarrayofstringLength(), json.testarrayofstring.length);
209 assert.strictEqual(monster.testarrayofstring(i), string);
210 …assert.deepEqual(new Buffer(monster.testarrayofstring(i, flatbuffers.Encoding.UTF8_BYTES)), new Bu…