Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/helpers/Attacking.js
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | for (let effectType of g_EffectTypes) | ||||
if (!attackData[effectType]) | if (!attackData[effectType]) | ||||
continue; | continue; | ||||
bonusMultiplier *= !attackData.Bonuses ? 1 : GetAttackBonus(attacker, target, attackType, attackData.Bonuses); | bonusMultiplier *= !attackData.Bonuses ? 1 : GetAttackBonus(attacker, target, attackType, attackData.Bonuses); | ||||
let receiver = g_EffectReceiver[effectType]; | let receiver = g_EffectReceiver[effectType]; | ||||
let cmpReceiver = Engine.QueryInterface(target, global[receiver.IID]); | let cmpReceiver = Engine.QueryInterface(target, global[receiver.IID]); | ||||
if (!cmpReceiver) | if (!cmpReceiver) | ||||
return; | continue; | ||||
Object.assign(targetState, cmpReceiver[receiver.method](attackData[effectType], attacker, attackerOwner, bonusMultiplier)); | Object.assign(targetState, cmpReceiver[receiver.method](attackData[effectType], attacker, attackerOwner, bonusMultiplier)); | ||||
} | } | ||||
let cmpPromotion = Engine.QueryInterface(attacker, IID_Promotion); | let cmpPromotion = Engine.QueryInterface(attacker, IID_Promotion); | ||||
if (cmpPromotion && targetState.xp) | if (cmpPromotion && targetState.xp) | ||||
cmpPromotion.IncreaseXp(targetState.xp); | cmpPromotion.IncreaseXp(targetState.xp); | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator