-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhonor.opy
26 lines (21 loc) · 1.03 KB
/
honor.opy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!mainFile "ANA_PB.opy"
rule "When player dies, display honor HUD":
@Event playerDied
@Hero ana
@Condition not eventWasEnvironment
victim.HonorTarget = attacker
victim.HonorBar = 100
chase(victim.HonorBar, 0, duration=CUSTOM_RESPAWN_TIME + 0.9, ChaseReeval.DESTINATION_AND_DURATION)
rule "Send honor message if GRENADE is pressed":
@SuppressWarnings w_ow2_rule_condition_chase
@Event eachPlayer
@Hero ana
@Condition eventPlayer.isHoldingButton(Button.ABILITY_2)
@Condition eventPlayer.HonorTarget != null
@Condition eventPlayer.HonorBar != 0
eventPlayer.HonorTarget.HonorQueue.append(eventPlayer)
eventPlayer.HonorTarget.MedalQueue.append(Medal.HONOR)
eventPlayer.HonorBar = 0
eventPlayer.MedalQueue = [Medal.SYSTEM_MESSAGE].concat(eventPlayer.MedalQueue)
smallMessage(eventPlayer, " {0} honor sent to {1}!".format(iconString(Icon.HAPPY), eventPlayer.HonorTarget))
playEffect(eventPlayer, DynamicEffect.BRIGITTE_REPAIR_PACK_ARMOR_SOUND, Color.WHITE, eventPlayer, 200)