Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/BotE Game/trunk/Source/Gamedata/Ships/Torpedo.cpp b/BotE Game/trunk/Source/Gamedata/Ships/Torpedo.cpp
- index 25642c3..be52e8a 100644
- --- a/BotE Game/trunk/Source/Gamedata/Ships/Torpedo.cpp
- +++ b/BotE Game/trunk/Source/Gamedata/Ships/Torpedo.cpp
- @@ -170,7 +170,8 @@ void CTorpedo::MakeDamage(CCombatShip* CS)
- if ((CTorpedoInfo::GetPenetrating(m_byType) == TRUE && CS->GetActRegShields() == FALSE)
- || CTorpedoInfo::GetIgnoreAllShields(m_byType) == TRUE || CS->m_bCanUseShields == FALSE)
- toHull = torpedoDamage;
- - CS->m_pShip->GetHull()->SetCurrentHull(-toHull);
- + int hullDmg = CTorpedoInfo::GetDoubleHullDmg(m_byType) ? : toHull * 2 : toHull;
- + CS->m_pShip->GetHull()->SetCurrentHull(-hullDmg);
- // den restlichen Torpedoschaden ermitteln, welcher nicht direkt auf die Hülle ging
- torpedoDamage -= toHull;
- @@ -191,24 +192,24 @@ void CTorpedo::MakeDamage(CCombatShip* CS)
- perc = 1.0f;
- torpedoDamage = (int)(torpedoDamage * perc);
- }
- - // Wenn die Torpedoart doppelten Schaden an den Schilden macht, dann einfach diesen hier *2 nehmen
- - if (CTorpedoInfo::GetDoubleShieldDmg(m_byType))
- - torpedoDamage *= 2;
- // Wenn die Torpedoart die Schilde kollabieren lassen kann, dann dies hier möglicherweise tun
- if (CTorpedoInfo::GetCollapseShields(m_byType))
- if (rand()%100 < 5) // 5% Chance die Schilde zusammenbrechen zu lassen
- CS->m_pShip->GetShield()->SetCurrentShield(0);
- + int shieldDmg = CTorpedoInfo::GetDoubleShieldDmg() ? torpedoDamage * 2 : torpedoDamage;
- // Der komplette Schaden geht auf die Schilde
- - if ((int)CS->m_pShip->GetShield()->GetCurrentShield() - torpedoDamage >= 0)
- - CS->m_pShip->GetShield()->SetCurrentShield((int)CS->m_pShip->GetShield()->GetCurrentShield() - torpedoDamage);
- + if ((int)CS->m_pShip->GetShield()->GetCurrentShield() - shieldDmg >= 0)
- + CS->m_pShip->GetShield()->SetCurrentShield((int)CS->m_pShip->GetShield()->GetCurrentShield() - shieldDmg);
- // Der Schaden geht teilweise auf Schilde und Hülle oder nur auf die Hülle
- else
- {
- + torpedoDamage = shieldDmg - CS->m_pShip->GetShield()->GetCurrentShield();
- + torpedoDamage = CTorpedoInfo::GetDoubleShieldDmg() ? torpedoDamage/2 : torpedoDamage; //reverse doubling effect
- // Wenn die Torpedoart doppelten Schaden an der Hülle macht, dann einfach diesen hier *2 nehmen
- if (CTorpedoInfo::GetDoubleHullDmg(m_byType))
- torpedoDamage *= 2;
- // Schaden der noch auf die Hülle geht
- - CS->m_pShip->GetHull()->SetCurrentHull((int)CS->m_pShip->GetShield()->GetCurrentShield() - torpedoDamage);
- + CS->m_pShip->GetHull()->SetCurrentHull(-torpedoDamage);
- CS->m_pShip->GetShield()->SetCurrentShield(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement