Skip to content

Commit

Permalink
Passive BGE Devotion: parameterized (as percent) (#78)
Browse files Browse the repository at this point in the history
* Passive BGE Devotion: parameterized (as percent)

Use "Devotion 20" to have 20% bonus, "Devotion 25" for 25% and so on

* Passive BGE Devotion: AHK: add X param to the Devotion
  • Loading branch information
dsuchka authored Aug 24, 2024
1 parent ec83f46 commit 7099647
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion SimpleTUOLiveSim.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FileDelete, %file%

MaxCardsSections := 100

BGEffects := "none|SuperHeroism|Crackdown|Devotion|Unity|Iron-Will|Cold-Sleep|Blood-Vengeance|Oath-of-Loyalty|Furiosity|TemporalBacklash|CriticalReach|Devour|HaltedOrders|ZealotsPreservation|Virulence|Enfeeble all X|Enhance all S X|Evolve n S1 S2|Heal all X|Mortar X|Protect all X|Rally all X|Siege all X|Strike all X|Weaken all X|Brigade|Bloodlust X|Counterflux|Divert|EnduringRage|Fortification|Heroism|Metamorphosis|Megamorphosis|Revenge X|TurningTides"
BGEffects := "none|SuperHeroism|Crackdown|Devotion X|Unity|Iron-Will|Cold-Sleep|Blood-Vengeance|Oath-of-Loyalty|Furiosity|TemporalBacklash|CriticalReach|Devour|HaltedOrders|ZealotsPreservation|Virulence|Enfeeble all X|Enhance all S X|Evolve n S1 S2|Heal all X|Mortar X|Protect all X|Rally all X|Siege all X|Strike all X|Weaken all X|Brigade|Bloodlust X|Counterflux|Divert|EnduringRage|Fortification|Heroism|Metamorphosis|Megamorphosis|Revenge X|TurningTides"
IniFileName := "data\SimpleTUOLiveSim.ini"
IniSection := "onLoad"

Expand Down
2 changes: 1 addition & 1 deletion SimpleTUOptimizeStarter.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FileDelete, %file%

MaxCardsSections := 100

BGEffects := "none|SuperHeroism|Crackdown|Devotion|Unity|Iron-Will|Cold-Sleep|Blood-Vengeance|Oath-of-Loyalty|Furiosity|TemporalBacklash|CriticalReach|Devour|HaltedOrders|ZealotsPreservation|Virulence|Enfeeble all X|Enhance all S X|Evolve n S1 S2|Heal all X|Mortar X|Protect all X|Rally all X|Siege all X|Strike all X|Weaken all X|Brigade|Bloodlust X|Counterflux|Divert|EnduringRage|Fortification|Heroism|Metamorphosis|Megamorphosis|Revenge X|TurningTides"
BGEffects := "none|SuperHeroism|Crackdown|Devotion X|Unity|Iron-Will|Cold-Sleep|Blood-Vengeance|Oath-of-Loyalty|Furiosity|TemporalBacklash|CriticalReach|Devour|HaltedOrders|ZealotsPreservation|Virulence|Enfeeble all X|Enhance all S X|Evolve n S1 S2|Heal all X|Mortar X|Protect all X|Rally all X|Siege all X|Strike all X|Weaken all X|Brigade|Bloodlust X|Counterflux|Divert|EnduringRage|Fortification|Heroism|Metamorphosis|Megamorphosis|Revenge X|TurningTides"
IniFileName := "data\SimpleTUOptimizeStarter.ini"
IniSection := "onLoad"

Expand Down
10 changes: 7 additions & 3 deletions sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,11 +1009,15 @@ struct PlayCard

}
//Devotion BGE
if (__builtin_expect(fd->bg_effects[status->m_player][PassiveBGE::devotion], false) && !summoned && card->m_category == CardCategory::normal && fd->players[status->m_player]->commander.m_card->m_faction == card->m_faction)
if (__builtin_expect(fd->bg_effects[status->m_player][PassiveBGE::devotion], false)
&& !summoned && card->m_category == CardCategory::normal
&& fd->players[status->m_player]->commander.m_card->m_faction == card->m_faction)
{
unsigned devotion_percent = fd->bg_effects[status->m_player][PassiveBGE::devotion];
unsigned bge_buff = (card->m_health*devotion_percent+99)/100;
_DEBUG_MSG(1, "Devotion %s: Gains %u HP\n",
status_description(status).c_str(), (2*card->m_health+4)/5);
status->ext_hp((2*card->m_health+4)/5); //40% bonus health (rounded up)
status_description(status).c_str(), bge_buff);
status->ext_hp(bge_buff); // <bge_value>% bonus health (rounded up)
}


Expand Down

0 comments on commit 7099647

Please sign in to comment.