void MonsterProperties::defenseRedo() { if (!InternalOperation && targetSprite){ auto sprite = dynamic_cast<EntityImageSprite*>(targetSprite); sprite->setDefense(defense->text().toInt()); } else if (!InternalOperation && !targetSprite && templateFile != ""){ resetTemplateValue(resetDefense); } }
void MonsterProperties::changeSpriteValue() { if (targetSprite && this->isVisible() && targetSprite->isHasMonsterProperties()){ auto sprite = dynamic_cast<EntityImageSprite*>(targetSprite); sprite->setHp(hp->text().toInt()); sprite->setMp(mp->text().toInt()); sprite->setAttack(attack->text().toInt()); sprite->setDefense(attack->text().toInt()); sprite->setMagic_Attack(magic_attack->text().toInt()); sprite->setMagic_Defense(magic_defense->text().toInt()); sprite->setSpeed(speed->text().toFloat()); sprite->setHardFactor(hardFactor->text().toFloat()); } }
Flame::Flame() { setTypeID(Boss_Flame); setCurrHealth(200); setMaxHealth(200); SetAttackRange(200); setAttackSpeed(0.25f); setAnchor(Vector2(1200,1200)); setDefense(20); setSight(500); setLevel(6); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
Bruiser::Bruiser() { setTypeID(Boss_Bruiser); chargeDamage = 30; setCurrHealth(200); setMaxHealth(200); SetAttackRange(200); setAnchor(Vector2(1200,1200)); setAttackSpeed(0.5f); setDefense(15); setSight(600); setLevel(5); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
Flame::Flame(Vector2 const &_position, Vector2 const &_velocity, int _ID, float _currHealth, int _direction) { setTypeID(Boss_Flame); setCurrHealth(_currHealth); setMaxHealth(200); setPosition(_position); setVelocity(_velocity); setDirection(_direction); setID(_ID); SetAttackRange(200); setAttackSpeed(0.25f); setDefense(20); setSight(500); setLevel(6); setAnchor(Vector2(1200,1200)); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }
Bruiser::Bruiser(Vector2 const &_position, Vector2 const &_velocity, int _ID, float _currHealth, int _direction) { setTypeID(Boss_Bruiser); chargeDamage = 30; setCurrHealth(_currHealth); setMaxHealth(200); setPosition(_position); setVelocity(_velocity); setDirection(_direction); setID(_ID); SetAttackRange(200); setAnchor(Vector2(1200,1200)); setAttackSpeed(0.5f); setDefense(15); setSight(600); setLevel(5); setAllAnimationsArray(); currentAnimation = allAnimations[Animation_East]; }