gameState.heroes[3].MapEntity().SetFlags(Entity::FLAG_NONBLOCKING);
gameState.heroes[2].MapEntity().AddFollower(&gameState.heroes[3].MapEntity());
+ graphics::Sprite flashSprite(IMG_Load("test-data/flash.png"), 96, 96);
+ graphics::ComplexAnimation flashAttackAnimation(&flashSprite, 132);
+ graphics::ComplexAnimation::FrameProp flashAttackFrames[4];
+ flashAttackFrames[0] = graphics::ComplexAnimation::FrameProp(0, 1, Vector<int>(0, -16));
+ flashAttackFrames[1] = graphics::ComplexAnimation::FrameProp(0, 0, Vector<int>(0, -16));
+ flashAttackFrames[2] = graphics::ComplexAnimation::FrameProp(0, 1, Vector<int>(0, -16));
+ flashAttackFrames[3] = graphics::ComplexAnimation::FrameProp(0, 0, Vector<int>(0, -16));
+ flashAttackAnimation.SetFrames(flashAttackFrames, 4);
+ Capsule capsule;
+ capsule.SetName("Flash");
+ capsule.SetHealth(5, 5);
+ capsule.SetLevel(1);
+ capsule.GetStats().SetAttack(12);
+ capsule.GetStats().SetDefense(18);
+ capsule.GetStats().SetStrength(2);
+ capsule.GetStats().SetAgility(11);
+ capsule.GetStats().SetIntelligence(16);
+ capsule.GetStats().SetGut(23);
+ capsule.GetStats().SetMagicResistance(11);
+ capsule.SetBattleSprite(&flashSprite);
+ capsule.SetAttackAnimation(&flashAttackAnimation);
+ capsule.SetMeleeAnimation(gameState.heroes[0].MeleeAnimation());
+
InitScreen screen(width, height);
app::State *state(0);
if (battle) {
- graphics::Sprite flashSprite(IMG_Load("test-data/flash.png"), 96, 96);
- Capsule capsule;
- capsule.SetName("Flash");
- capsule.SetHealth(13, 13);
- capsule.SetBattleSprite(&flashSprite);
-
BattleState *battleState(new BattleState(&gameConfig, bg, &monstersLayout));
battleState->AddMonster(monster);
battleState->AddMonster(monster);