|
|
|
|
|
PlaceObj('CombatTask', { |
|
competition = true, |
|
description = T(845938577236, "<Nick> should deal more damage than <Nick(otherUnitId)>"), |
|
group = "Competition", |
|
holdUntilEnd = true, |
|
id = "DamageCompetition", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "DamageDone", |
|
Handler = function (self, attacker, target, dmg, hit_descr) |
|
if IsMerc(attacker) and IsKindOf(target, "Unit") and target:IsOnEnemySide(attacker) then |
|
local task = FindActiveCombatTask(self.id) |
|
if dmg > 0 and task then |
|
if task.unitId == attacker.session_id then |
|
task:Update(dmg) |
|
elseif task.otherUnitId == attacker.session_id then |
|
task:Update(0, dmg) |
|
end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(224628040381, "Damage Competition"), |
|
requiredProgress = 0, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
competition = true, |
|
description = T(841992932482, "<Nick> should make more kills than <Nick(otherUnitId)>"), |
|
group = "Competition", |
|
holdUntilEnd = true, |
|
id = "KillCompetition", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "Attack", |
|
Handler = function (self, action, results, attack_args, combat_starting, attacker, target) |
|
if IsMerc(attacker) then |
|
local kills = EnemiesKilled(attacker, results) |
|
local task = FindActiveCombatTask(self.id) |
|
if kills > 0 and task then |
|
if task.unitId == attacker.session_id then |
|
task:Update(kills) |
|
elseif task.otherUnitId == attacker.session_id then |
|
task:Update(0, kills) |
|
end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(769258541854, "Kill Competition"), |
|
requiredProgress = 0, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(333205819142, "The team must kill <requiredProgress> opponents with assault rifles or SMGs"), |
|
group = "Default", |
|
id = "AutomaticKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOfClasses(results.weapon, "AssaultRifle", "SubmachineGun") then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(226845938375, "Automatic Kills"), |
|
requiredProgress = 3, |
|
selectionConditions = { |
|
PlaceObj('CheckOR', { |
|
Conditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "AssaultRifle", |
|
}), |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "SubmachineGun", |
|
}), |
|
}, |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Marksmanship", |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(335291031338, "<Nick> should inflict <requiredProgress> damage to the enemies"), |
|
favouredConditions = { |
|
PlaceObj('UnitHasPerk', { |
|
HasPerk = "Psycho", |
|
TargetUnit = "current unit", |
|
}), |
|
}, |
|
group = "Default", |
|
id = "DamageDealer", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "DamageDone", |
|
Handler = function (self, attacker, target, dmg, hit_descr) |
|
if IsMerc(attacker) and IsKindOf(target, "Unit") and target:IsOnEnemySide(attacker) then |
|
local task = attacker:FirstCombatTaskById(self.id) |
|
if task then |
|
task:Update(dmg) |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(823186688823, "Destruction Distributor"), |
|
requiredProgress = 150, |
|
statGainRolls = { |
|
"Strength", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(171286303887, "<Nick> should make a kill and never suffer damage in the conflict"), |
|
group = "Default", |
|
holdUntilEnd = true, |
|
id = "ElusiveKiller", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "Attack", |
|
Handler = function (self, action, results, attack_args, combat_starting, attacker, target) |
|
if IsMerc(attacker) and IsEnemyKill(attacker, results) then |
|
local task = attacker:FirstCombatTaskById(self.id) |
|
if task then task:Update(1) end |
|
end |
|
end, |
|
}), |
|
PlaceObj('MsgReaction', { |
|
Event = "DamageDone", |
|
Handler = function (self, attacker, target, dmg, hit_descr) |
|
if IsMerc(target) then |
|
local task = target:FirstCombatTaskById(self.id) |
|
if task then task:Fail() end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(996733824590, "Elusive Killer"), |
|
statGainRolls = { |
|
"Agility", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(329933122394, "The team should kill <requiredProgress> opponents in explosions"), |
|
favouredConditions = { |
|
PlaceObj('UnitHasPerk', { |
|
HasPerk = "Throwing", |
|
TargetUnit = "current unit", |
|
}), |
|
}, |
|
group = "Default", |
|
id = "ExplosiveKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "UnitDieStart", |
|
Handler = function (self, unit, attacker) |
|
if IsMerc(attacker) then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then |
|
if unit.on_die_hit_descr and unit.on_die_hit_descr.explosion and unit:IsOnEnemySide(attacker) and not unit.immortal then |
|
task:Update(1) |
|
end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(327792067279, "Explosive Kills"), |
|
requiredProgress = 2, |
|
selectionConditions = { |
|
PlaceObj('CheckOR', { |
|
Conditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "Grenade", |
|
}), |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "HeavyWeapon", |
|
}), |
|
}, |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Explosives", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(927408184696, "The team must kill <requiredProgress> enemies with attacks in the groin."), |
|
group = "Default", |
|
id = "GroinKiller", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and target and target.species == "Human" and attack_args.target_spot_group == "Groin" then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(1) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(639828499284, "Make them Suffer"), |
|
requiredProgress = 3, |
|
statGainRolls = { |
|
"Dexterity", |
|
"Marksmanship", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(443919022423, "The team must kill <requiredProgress> opponents with a handgun."), |
|
group = "Default", |
|
id = "HandgunKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOfClasses(results.weapon, "Pistol", "Revolver") then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(542106263178, "Handgun Kills"), |
|
requiredProgress = 3, |
|
selectionConditions = { |
|
PlaceObj('CheckOR', { |
|
Conditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "Pistol", |
|
}), |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "Revolver", |
|
}), |
|
}, |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(205022452436, "The team must make <requiredProgress> headshots."), |
|
group = "Default", |
|
id = "Headhunter", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) then |
|
local headshots = 0 |
|
for _, shot in ipairs(results.shots) do |
|
for _, hit in ipairs(shot.hits) do |
|
if hit.spot_group and hit.spot_group == "Head" then |
|
headshots = headshots + 1 |
|
end |
|
end |
|
end |
|
if headshots > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(headshots) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(932478123102, "Headhunter"), |
|
requiredProgress = 5, |
|
statGainRolls = { |
|
"Marksmanship", |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(229072979907, "The team must make <requiredProgress> limb shots"), |
|
group = "Default", |
|
id = "LimbShots", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) then |
|
local limbShots = 0 |
|
for _, shot in ipairs(results.shots) do |
|
for _, hit in ipairs(shot.hits) do |
|
if hit.spot_group and (hit.spot_group == "Legs" or hit.spot_group == "Arms") then |
|
limbShots = limbShots + 1 |
|
end |
|
end |
|
end |
|
if limbShots > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(limbShots) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(205504297105, "Mutilator"), |
|
requiredProgress = 5, |
|
statGainRolls = { |
|
"Marksmanship", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(278405651391, "The team must kill <requiredProgress> opponents with a machine gun."), |
|
group = "Default", |
|
id = "MachineGunKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOf(results.weapon, "MachineGun") then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(349362366984, "Machine Gun Kills"), |
|
requiredProgress = 3, |
|
selectionConditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "MachineGun", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Strength", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(721165610277, "The team must kill <requiredProgress> opponents with melee attacks."), |
|
group = "Default", |
|
id = "MeleeKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and results.melee_attack then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(557045464354, "Melee Kills"), |
|
requiredProgress = 3, |
|
selectionConditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "MeleeWeapon", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Agility", |
|
"Strength", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(956158880979, "<Nick> must kill <requiredProgress> enemies at point-blank range."), |
|
group = "Default", |
|
id = "PointBlank", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if not IsMerc(attacker) then |
|
return |
|
end |
|
local kills = 0 |
|
local weapon = attack_args and attack_args.weapon |
|
for _, unit in ipairs(results.killed_units) do |
|
if attacker:IsOnEnemySide(unit) then |
|
if attacker:IsPointBlankRange(unit) then |
|
kills = kills + 1 |
|
end |
|
end |
|
end |
|
if kills > 0 then |
|
local task = attacker:FirstCombatTaskById(self.id) |
|
if task then |
|
task:Update(kills) |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(282408867052, "Point-Blank"), |
|
requiredProgress = 2, |
|
statGainRolls = { |
|
"Health", |
|
"Strength", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(993385738600, "<Nick> should hit <requiredProgress> enemies with headshots aimed 3+ times"), |
|
group = "Default", |
|
id = "PrecisionHeadshots", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOf(target, "Unit") and target:IsOnEnemySide(attacker) then |
|
if attack_args.target_spot_group == "Head" and not results.miss and IsFullyAimedAttack(attack_args) then |
|
local task = attacker:FirstCombatTaskById(self.id) |
|
if task then task:Update(1) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(174050258256, "Put this apple..."), |
|
requiredProgress = 3, |
|
statGainRolls = { |
|
"Dexterity", |
|
"Marksmanship", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(966001057856, "<Nick> should kill <requiredProgress> opponents in the same turn."), |
|
group = "Default", |
|
id = "SameTurnKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "Attack", |
|
Handler = function (self, action, results, attack_args, combat_starting, attacker, target) |
|
if IsMerc(attacker) then |
|
local task = attacker:FirstCombatTaskById(self.id) |
|
if not task then return end |
|
|
|
if not g_Combat and not combat_starting then |
|
|
|
task:Update(-task.currentProgress) |
|
else |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
task:Update(kills) |
|
end |
|
end |
|
end |
|
end, |
|
}), |
|
PlaceObj('MsgReaction', { |
|
Event = "TurnEnded", |
|
Handler = function (self, teamEnded, combatEnd) |
|
if g_Teams[teamEnded].player_team and not combatEnd then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(-task.currentProgress) end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(310758257957, "Killing Spree"), |
|
requiredProgress = 2, |
|
statGainRolls = { |
|
"Agility", |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(134640217789, "The team must kill <requiredProgress> opponents with a shotgun."), |
|
group = "Default", |
|
id = "ShotgunKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOf(results.weapon, "Shotgun") then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(313568472782, "Shotgun Kills"), |
|
requiredProgress = 3, |
|
selectionConditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "Shotgun", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Strength", |
|
"Health", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(684260672157, "The team must kill <requiredProgress> opponents with a sniper rifle."), |
|
group = "Default", |
|
id = "SniperKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOf(results.weapon, "SniperRifle") then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(755273724300, "Sniper Rifle Kills"), |
|
requiredProgress = 3, |
|
selectionConditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "SniperRifle", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Marksmanship", |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(154890444164, "The team must make <requiredProgress> kills with special attacks."), |
|
group = "Default", |
|
id = "SpecialKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) then |
|
if not IsBasicAttack(action, attack_args) then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(215882327453, "Specialist"), |
|
requiredProgress = 3, |
|
statGainRolls = { |
|
"Wisdom", |
|
"Leadership", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(377620512670, "<Nick> should start the first combat in Stealth and the team should kill <requiredProgress> opponents before the end of the first turn."), |
|
favouredConditions = { |
|
PlaceObj('UnitHasPerk', { |
|
HasPerk = "Stealthy", |
|
TargetUnit = "current unit", |
|
}), |
|
}, |
|
group = "Default", |
|
id = "StealthyApproach", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "Attack", |
|
Handler = function (self, action, results, attack_args, combat_starting, attacker, target) |
|
if IsMerc(attacker) then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
PlaceObj('MsgReaction', { |
|
Event = "TurnStart", |
|
Handler = function (self, team) |
|
if g_Teams[team].player_team and g_Combat.current_turn >= 2 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Fail() end |
|
end |
|
end, |
|
}), |
|
PlaceObj('MsgReaction', { |
|
Event = "CombatStart", |
|
Handler = function (self, dynamic_data) |
|
local task = FindActiveCombatTask(self.id) |
|
if task then |
|
local fail = false |
|
if g_Combat.starting_unit and g_Combat.starting_unit.session_id ~= task.unitId then |
|
task:Fail() |
|
return |
|
end |
|
local unit = g_Units[task.unitId] |
|
if not unit:HasStatusEffect("Hidden") then task:Fail() end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(965484524496, "Stealthy Approach"), |
|
requiredProgress = 2, |
|
selectionConditions = { |
|
PlaceObj('UnitHasPerk', { |
|
HasPerk = "Stealthy", |
|
TargetUnit = "current unit", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Agility", |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(170953530026, "The team should take less than <requiredProgress> damage in the conflict."), |
|
group = "Default", |
|
id = "TakeLessDamage", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "DamageDone", |
|
Handler = function (self, attacker, target, dmg, hit_descr) |
|
if IsMerc(target) then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then |
|
task:Update(dmg) |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(974373173731, "Careful Combatant"), |
|
requiredProgress = 50, |
|
reverseProgress = true, |
|
statGainRolls = { |
|
"Medical", |
|
"Leadership", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(500135776127, "No merc other than <Nick> should take wounds from damage this combat"), |
|
group = "Default", |
|
hideProgress = true, |
|
holdUntilEnd = true, |
|
id = "TankWounds", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "StatusEffectAdded", |
|
Handler = function (self, obj, id, stacks) |
|
if IsMerc(obj) and id == "Wounded" then |
|
local task = FindActiveCombatTask(self.id) |
|
if task and task.unitId ~= obj.session_id then |
|
task:Fail() |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(437732136157, "Ardent Defender"), |
|
requiredProgress = 0, |
|
statGainRolls = { |
|
"Health", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(567465673654, "<Nick> must kill <requiredProgress> opponent with a knife throw."), |
|
group = "Default", |
|
id = "ThrowKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOf(results.weapon, "MeleeWeapon") and action.id == "KnifeThrow" then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = attacker:FirstCombatTaskById(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(119727567879, "Knife Juggler"), |
|
selectionConditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "ThrowableKnife", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Dexterity", |
|
}, |
|
}) |
|
|
|
PlaceObj('CombatTask', { |
|
description = T(877038884070, "<Nick> must kill <requiredProgress> opponent with unarmed attacks."), |
|
group = "Default", |
|
id = "UnarmedKills", |
|
msg_reactions = { |
|
PlaceObj('MsgReaction', { |
|
Event = "OnAttack", |
|
Handler = function (self, attacker, action, target, results, attack_args) |
|
if IsMerc(attacker) and IsKindOf(results.weapon, "Unarmed") then |
|
local kills = EnemiesKilled(attacker, results) |
|
if kills > 0 then |
|
local task = FindActiveCombatTask(self.id) |
|
if task then task:Update(kills) end |
|
end |
|
end |
|
end, |
|
}), |
|
}, |
|
name = T(315709994208, "Brutalizer"), |
|
selectionConditions = { |
|
PlaceObj('UnitHasWeaponKind', { |
|
TargetUnit = "current unit", |
|
weaponKind = "Unarmed", |
|
}), |
|
PlaceObj('UnitHasStat', { |
|
Amount = 75, |
|
Stat = "Strength", |
|
TargetUnit = "current unit", |
|
}), |
|
}, |
|
statGainRolls = { |
|
"Strength", |
|
}, |
|
}) |
|
|
|
|