mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
parent
2ae53395d7
commit
e3a8a41063
@ -600,7 +600,7 @@ void CPlayerInterface::battleStacksHealedRes(const std::vector<std::pair<ui32, u
|
|||||||
|
|
||||||
if (attacker)
|
if (attacker)
|
||||||
{
|
{
|
||||||
battleInt->displayEffect(52, attacker->position);
|
battleInt->displayEffect(52, attacker->position); //TODO: transparency
|
||||||
if (attacker->count > 1)
|
if (attacker->count > 1)
|
||||||
{
|
{
|
||||||
textOff += 1;
|
textOff += 1;
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
{ "id": 49, "defnames": [ "C11SPA1.DEF" ] },
|
{ "id": 49, "defnames": [ "C11SPA1.DEF" ] },
|
||||||
{ "id": 50, "defnames": [ "C12SPE0.DEF" ] },
|
{ "id": 50, "defnames": [ "C12SPE0.DEF" ] },
|
||||||
{ "id": 51, "defnames": [ "C12SPF0.DEF" ] },
|
{ "id": 51, "defnames": [ "C12SPF0.DEF" ] },
|
||||||
{ "id": 52, "defnames": [ "C12SPE0.DEF" ] },
|
{ "id": 52, "defnames": [ "SP06_.DEF" ] },
|
||||||
{ "id": 53, "defnames": [ "C13SPF.DEF", "C13SPF0.DEF" ] },
|
{ "id": 53, "defnames": [ "C13SPF.DEF", "C13SPF0.DEF" ] },
|
||||||
{ "id": 54, "defnames": [ "C16SPE.DEF", "C16SPE0.DEF" ] },
|
{ "id": 54, "defnames": [ "C16SPE.DEF", "C16SPE0.DEF" ] },
|
||||||
{ "id": 55, "defnames": [ "C17SPE0.DEF" ] },
|
{ "id": 55, "defnames": [ "C17SPE0.DEF" ] },
|
||||||
|
@ -1341,7 +1341,6 @@
|
|||||||
"faction": 8,
|
"faction": 8,
|
||||||
"ability_add": [ [ "CASTS", 1, 0, 0 ], //Phoenix rebirths once
|
"ability_add": [ [ "CASTS", 1, 0, 0 ], //Phoenix rebirths once
|
||||||
[ "REBIRTH", 20, 0, 0 ] ], //20% of stack is resurrected
|
[ "REBIRTH", 20, 0, 0 ] ], //20% of stack is resurrected
|
||||||
"upgrade": 15,
|
|
||||||
"defname": "CPHX.DEF"
|
"defname": "CPHX.DEF"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -249,16 +249,16 @@ struct DLL_EXPORT ArtSlotInfo
|
|||||||
class DLL_EXPORT IArtifactSetBase
|
class DLL_EXPORT IArtifactSetBase
|
||||||
{ ///artifacts container
|
{ ///artifacts container
|
||||||
public:
|
public:
|
||||||
virtual void setNewArtSlot(ui16 slot, CArtifactInstance *art, bool locked); //redundant inheritance
|
virtual void setNewArtSlot(ui16 slot, CArtifactInstance *art, bool locked);
|
||||||
virtual const CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true) const; //redundant inheritance
|
virtual const CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true) const;
|
||||||
virtual CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true); //NULL - no artifact
|
virtual CArtifactInstance* getArt(ui16 pos, bool excludeLocked = true); //NULL - no artifact
|
||||||
virtual bool hasArt(ui32 aid, bool onlyWorn = false) const; //redundant inheritance
|
virtual bool hasArt(ui32 aid, bool onlyWorn = false) const;
|
||||||
virtual bool isPositionFree(ui16 pos, bool onlyLockCheck = false) const; //redundant inheritance
|
virtual bool isPositionFree(ui16 pos, bool onlyLockCheck = false) const;
|
||||||
|
|
||||||
virtual ArtSlotInfo &retreiveNewArtSlot(ui16 slot)=0;
|
virtual ArtSlotInfo &retreiveNewArtSlot(ui16 slot)=0;
|
||||||
virtual void eraseArtSlot(ui16 slot)=0;
|
virtual void eraseArtSlot(ui16 slot)=0;
|
||||||
|
|
||||||
virtual const ArtSlotInfo *getSlot(ui16 pos) const=0;
|
virtual const ArtSlotInfo *getSlot(ui16 pos) const=0;
|
||||||
virtual si32 getArtPos(int aid, bool onlyWorn = true) const=0; //looks for equipped artifact with given ID and returns its slot ID or -1 if none(if more than one such artifact lower ID is returned)
|
virtual si32 getArtPos(int aid, bool onlyWorn = true) const=0; //looks for equipped artifact with given ID and returns its slot ID or -1 if none(if more than one such artifact lower ID is returned)
|
||||||
virtual si32 getArtPos(const CArtifactInstance *art) const=0;
|
virtual si32 getArtPos(const CArtifactInstance *art) const=0;
|
||||||
virtual const CArtifactInstance *getArtByInstanceId(int artInstId) const=0;
|
virtual const CArtifactInstance *getArtByInstanceId(int artInstId) const=0;
|
||||||
@ -275,7 +275,7 @@ public:
|
|||||||
void eraseArtSlot(ui16 slot);
|
void eraseArtSlot(ui16 slot);
|
||||||
|
|
||||||
const ArtSlotInfo *getSlot(ui16 pos) const;
|
const ArtSlotInfo *getSlot(ui16 pos) const;
|
||||||
si32 getArtPos(int aid, bool onlyWorn = true) const; //looks for equipped artifact with given ID and returns its slot ID or -1 if none(if more than one such artifact lower ID is returned)
|
si32 getArtPos(int aid, bool onlyWorn = true) const;
|
||||||
si32 getArtPos(const CArtifactInstance *art) const;
|
si32 getArtPos(const CArtifactInstance *art) const;
|
||||||
const CArtifactInstance *getArtByInstanceId(int artInstId) const;
|
const CArtifactInstance *getArtByInstanceId(int artInstId) const;
|
||||||
si32 getArtTypeId(ui16 pos) const;
|
si32 getArtTypeId(ui16 pos) const;
|
||||||
|
@ -581,7 +581,6 @@ void CGameHandler::applyBattleEffects(BattleAttack &bat, const CStack *att, cons
|
|||||||
bsa.stackAttacked = def->ID;
|
bsa.stackAttacked = def->ID;
|
||||||
bsa.damageAmount = gs->curB->calculateDmg(att, def, gs->curB->battleGetOwner(att), gs->curB->battleGetOwner(def), bat.shot(), distance, bat.lucky(), bat.deathBlow(), bat.ballistaDoubleDmg());
|
bsa.damageAmount = gs->curB->calculateDmg(att, def, gs->curB->battleGetOwner(att), gs->curB->battleGetOwner(def), bat.shot(), distance, bat.lucky(), bat.deathBlow(), bat.ballistaDoubleDmg());
|
||||||
def->prepareAttacked(bsa); //calculate casualties
|
def->prepareAttacked(bsa); //calculate casualties
|
||||||
bat.bsa.push_back(bsa); //add this stack to the list of victims
|
|
||||||
|
|
||||||
//life drain handling
|
//life drain handling
|
||||||
if (att->hasBonusOfType(Bonus::LIFE_DRAIN) && def->isLiving())
|
if (att->hasBonusOfType(Bonus::LIFE_DRAIN) && def->isLiving())
|
||||||
@ -601,7 +600,8 @@ void CGameHandler::applyBattleEffects(BattleAttack &bat, const CStack *att, cons
|
|||||||
{
|
{
|
||||||
bsa.healedStacks.push_back(shi);
|
bsa.healedStacks.push_back(shi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bat.bsa.push_back(bsa); //add this stack to the list of victims after drain life has been calculated
|
||||||
|
|
||||||
//fire shield handling
|
//fire shield handling
|
||||||
if (!bat.shot() && def->hasBonusOfType(Bonus::FIRE_SHIELD) && !att->hasBonusOfType (Bonus::FIRE_IMMUNITY) && !bsa.killed() )
|
if (!bat.shot() && def->hasBonusOfType(Bonus::FIRE_SHIELD) && !att->hasBonusOfType (Bonus::FIRE_IMMUNITY) && !bsa.killed() )
|
||||||
|
Loading…
Reference in New Issue
Block a user