Fix corruption reflection

This commit is contained in:
gsemaj 2023-08-19 15:26:56 -07:00
parent 0fcf41cbfe
commit 0eff236512
No known key found for this signature in database
GPG Key ID: 24B96BAA40497929
2 changed files with 18 additions and 6 deletions

View File

@ -218,6 +218,8 @@ static std::vector<SkillResult> handleSkill(SkillData* skill, int power, ICombat
case SkillType::CORRUPTIONATTACK:
case SkillType::CORRUPTIONATTACKLOSE:
case SkillType::CORRUPTIONATTACKWIN:
// skillHandler = handleSkillCorruptionReflect;
// break;
case SkillType::DAMAGE:
skillHandler = handleSkillDamage;
break;

View File

@ -295,12 +295,22 @@ static void dealCorruption(Mob *mob, std::vector<int> targetData, int skillID, i
if (plr->Nanos[plr->activeNano].iStamina > 150)
respdata[i].iNanoStamina = plr->Nanos[plr->activeNano].iStamina = 150;
// fire damage power disguised as a corruption attack back at the enemy
SkillData skill = Abilities::SkillTable[skillID];
skill.durationTime[0] = 0;
skill.values[0][0] = 200; // have to set
skill.values[0][1] = 200; // all of these
skill.values[0][2] = 200; // because the player might
skill.values[0][3] = 200; // have a boost
SkillData skill = {
SkillType::DAMAGE, // skillType
SkillEffectTarget::POINT, // effectTarget
1, // effectType
SkillTargetType::MOBS, // targetType
SkillDrainType::ACTIVE, // drainType
0, // effectArea
{0, 0, 0, 0}, // batteryUse
{0, 0, 0, 0}, // durationTime
{0, 0, 0}, // valueTypes (unused)
{
{200, 200, 200, 200},
{200, 200, 200, 200},
{200, 200, 200, 200},
}
};
Abilities::useNanoSkill(sock, &skill, *plr->getActiveNano(), { mob });
} else {
respdata[i].iHitFlag = HF_BIT_STYLE_LOSE;