1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

More details for Rebirth ability.

This commit is contained in:
DjWarmonger 2011-07-10 09:03:46 +00:00
parent 036ad1233f
commit a7577ccb6b
4 changed files with 14 additions and 3 deletions

View File

@ -2536,7 +2536,10 @@ void CBattleInterface::stacksAreAttacked(std::vector<SStackAttackedInfo> attacke
{
addNewAnim(new CDefenceAnim(attackedInfos[h], this));
if (attackedInfos[h].rebirth)
{
displayEffect(50, attackedInfos[h].defender->position); //TODO: play reverse death animation
CCS->soundh->playSound(soundBase::RESURECT);
}
}
waitForAnims();
for(int h = 0; h < attackedInfos.size(); ++h)

View File

@ -47,3 +47,4 @@ AIR_IMMUNITY Immune to Air
EARTH_IMMUNITY Immune to Earth
DIRECT_DAMAGE_IMMUNITY Direct Damage Immunity Immune to direct damage spells
RECEPTIVE Receptive No Immunity to Friendly Spells
REBIRTH Rebirth (%d%) Stack will rise after death

View File

@ -893,7 +893,10 @@ void CCreatureHandler::loadStackExp(Bonus & b, BonusList & bl, std::string & src
return;
}
return;
case 'r': //TODO: Rebirth on/off? makes sense?
case 'r':
b.type = Bonus::REBIRTH; //on/off? makes sense?
b.subtype = 0;
b.val = 20; //arbitrary value
break;
case 'R':
b.type = Bonus::BLOCKS_RETALIATION; break;
@ -1044,7 +1047,8 @@ void CCreatureHandler::loadStackExp(Bonus & b, BonusList & bl, std::string & src
if (enable) //0 and 2 means non-active, 1 - active
{
b.val = 0; //on-off ability, no value specified
if (b.type != Bonus::REBIRTH)
b.val = 0; //on-off ability, no value specified
loadToIt (curVal, src, it, 4); // 0 level is never active
for (int i = 1; i < 11; ++i)
{

View File

@ -574,6 +574,7 @@ std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const
case Bonus::ATTACKS_ALL_ADJACENT:
case Bonus::ADDITIONAL_ATTACK: //TODO: what with more than one attack? Axe of Ferocity for example
case Bonus::FULL_HP_REGENERATION:
case Bonus::REBIRTH:
case Bonus::LIFE_DRAIN: //TODO: chance, hp percentage?
case Bonus::SELF_MORALE:
case Bonus::SELF_LUCK:
@ -638,6 +639,7 @@ std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const
case Bonus::CHANGES_SPELL_COST_FOR_ALLY:
case Bonus::CHANGES_SPELL_COST_FOR_ENEMY:
case Bonus::ENEMY_DEFENCE_REDUCTION:
case Bonus::REBIRTH:
case Bonus::DEATH_STARE:
boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>(valOfBonuses(Selector::typeSubtype(bonus->type, bonus->subtype))));
break;
@ -737,7 +739,8 @@ std::string CStackInstance::bonusToGraphics(Bonus *bonus) const
fileName = "E_OBST.bmp"; break;
case Bonus::ENEMY_DEFENCE_REDUCTION:
fileName = "E_RDEF.bmp"; break;
//"E_REBIRTH.bmp"
case Bonus::REBIRTH:
fileName = "E_REBIRTH.bmp"; break;
case Bonus::BLOCKS_RETALIATION:
fileName = "E_RETAIL.bmp"; break;
case Bonus::ADDITIONAL_RETALIATION: