Nanocom Boosters and Authentic FM-Taro Scale Logic (#315)

* Groundwork for nanocom boosters

* The item use handler now has a switch for multiple item types (currently gumballs, and a stub for boosters)
* All item types are now checked for expiration, not just vehicles

* implement nanocom booster helpers, save and expiry

* implement authentic taro and fm modfication

* magic number and code refactor

* make sure only close by group members are counted

* add safe taro fm handling, rate command, race and mission booster logic

* add config option to disable authentic group scaling

* rename for consistency

* make rates percentages, fix chat message, add config options

* add config option to the ini file

* add index guard for hasBoost functions

* reorder config ini options

* add bank item expiry option

* fix trade oversight

---------

Co-authored-by: CakeLancelot <CakeLancelot@users.noreply.github.com>
This commit is contained in:
FinnHornhoover
2026-03-25 20:09:40 +03:00
committed by GitHub
parent 9a62ec61c9
commit 113bc0bc1b
26 changed files with 691 additions and 258 deletions

View File

@@ -170,11 +170,11 @@ static SkillResult handleSkillBatteryDrain(SkillData* skill, int power, ICombata
if(!blocked) {
boostDrain = (int)(skill->values[0][power] * scalingFactor);
if(boostDrain > plr->batteryW) boostDrain = plr->batteryW;
plr->batteryW -= boostDrain;
plr->subtractCapped(CappedValueType::BATTERY_W, boostDrain);
potionDrain = (int)(skill->values[1][power] * scalingFactor);
if(potionDrain > plr->batteryN) potionDrain = plr->batteryN;
plr->batteryN -= potionDrain;
plr->subtractCapped(CappedValueType::BATTERY_N, potionDrain);
}
sSkillResult_BatteryDrain result{};
@@ -364,7 +364,7 @@ void Abilities::useNPCSkill(EntityRef npc, int skillID, std::vector<ICombatant*>
ICombatant* src = nullptr;
if(npc.kind == EntityKind::COMBAT_NPC || npc.kind == EntityKind::MOB)
src = dynamic_cast<ICombatant*>(entity);
SkillData* skill = &SkillTable[skillID];
std::vector<SkillResult> results = handleSkill(skill, 0, src, affected);
@@ -443,7 +443,7 @@ std::vector<ICombatant*> Abilities::matchTargets(ICombatant* src, SkillData* ski
}
}
return targets;
return targets;
}
/* ripped from client (enums emplaced) */