finished incorporating messaging into the UI window and added another custom control to make updating the UI easier
This commit is contained in:
@@ -10,24 +10,13 @@ brn:
|
||||
1.frac
|
||||
}
|
||||
onStart: |
|
||||
if (!source.isMove) {
|
||||
print(s"[${source.mon}'s ${source.effect}]")
|
||||
}
|
||||
msg(s"${mon} was burned!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.id === 'flameorb') {
|
||||
target.status = Status('brn', '[from] 'item': Flame Orb');
|
||||
} else if (sourceEffect && sourceEffect.effectType === 'Ability') {
|
||||
target.status = Status('brn', '[from] 'ability': ' + sourceEffect.name, '[of] ' + source);
|
||||
} else {
|
||||
target.status = Status('brn');
|
||||
}*/
|
||||
onEnd: |
|
||||
println(s"${mon} was healed of its burn.")
|
||||
msg(s"${mon} was healed of its burn.")
|
||||
onResidualOrder: 9
|
||||
onResidual: |
|
||||
mon.takeDamage(mon(Hp) / 16);
|
||||
println(s"${mon} was hurt by its burn!")
|
||||
msg(s"${mon} was hurt by its burn!")
|
||||
|
||||
confusion:
|
||||
id: confusion
|
||||
@@ -39,7 +28,7 @@ confusion:
|
||||
mon -= self
|
||||
true
|
||||
} else {
|
||||
println(s"${mon} is confused!")
|
||||
msg(s"${mon} is confused!")
|
||||
if (rng.chance(1, 3)) {
|
||||
// confusion damage
|
||||
val maxDmg = (2 * mon.level / 5 + 2) * 40 * mon(PAtk) / (mon(PDef) * 50) + 2
|
||||
@@ -63,15 +52,9 @@ confusion:
|
||||
}));
|
||||
*/
|
||||
onBeforeMovePriority: 3
|
||||
onEnd: println(s"${mon} snapped out of its confusion.")
|
||||
onEnd: msg(s"${mon} snapped out of its confusion.")
|
||||
onStart: |-
|
||||
msg(s"${mon} was confused!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.id === 'lockedmove') {
|
||||
this.add('-start', target, 'confusion', '[fatigue]');
|
||||
} else {
|
||||
this.add('-start', target, 'confusion');
|
||||
}*/
|
||||
self.intData("time") = rng.nextInt(2, 6);
|
||||
|
||||
par:
|
||||
@@ -80,19 +63,9 @@ par:
|
||||
num: 0
|
||||
effectType: 'Status'
|
||||
onStart: |
|
||||
if (!source.isMove) {
|
||||
print(s"[${source.mon}'s ${source.effect}]")
|
||||
}
|
||||
println(s"${mon} was paralyzed!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.effectType === 'Ability') {
|
||||
this.add('-status', target, 'par', '[from] ability: ' + sourceEffect.name, '[of] ' + source);
|
||||
} else {
|
||||
this.add('-status', target, 'par');
|
||||
}
|
||||
*/
|
||||
msg(s"${mon} was paralyzed!")
|
||||
onEnd: |
|
||||
println(s"${mon} is no longer paralyzed!")
|
||||
msg(s"${mon} is no longer paralyzed!")
|
||||
onModifyStat: |
|
||||
if (stat == Speed /* && !mon.hasAbility('quickfeet') */) {
|
||||
1 \\ 2
|
||||
@@ -114,21 +87,12 @@ slp:
|
||||
num: 0
|
||||
effectType: 'Status'
|
||||
onStart: |
|
||||
println(s"${mon} fell asleep!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.effectType === 'Ability') {
|
||||
this.add('-status', target, 'slp', '[from] ability: ' + sourceEffect.name, '[of] ' + source);
|
||||
} else if (sourceEffect && sourceEffect.effectType === 'Move') {
|
||||
this.add('-status', target, 'slp', '[from] move: ' + sourceEffect.name);
|
||||
} else {
|
||||
this.add('-status', target, 'slp');
|
||||
}
|
||||
*/
|
||||
msg(s"${mon} fell asleep!")
|
||||
// 1-3 turns
|
||||
self.intData("startTime") = rng.nextInt(2, 5)
|
||||
self.intData("time") = self.intData("startTime")
|
||||
onEnd: |
|
||||
println(s"${mon} woke up!")
|
||||
msg(s"${mon} woke up!")
|
||||
onBeforeMovePriority: 10
|
||||
onBeforeMove: |
|
||||
/*
|
||||
@@ -141,7 +105,7 @@ slp:
|
||||
mon.cureStatus();
|
||||
true
|
||||
} else {
|
||||
println(s"${mon} is fast asleep.")
|
||||
msg(s"${mon} is fast asleep.")
|
||||
!move.flags("sleepUsable")
|
||||
}
|
||||
|
||||
@@ -151,7 +115,7 @@ flinch:
|
||||
name: flinch
|
||||
num: 0
|
||||
onBeforeMove: |-
|
||||
println(s"${mon} flinched!")
|
||||
msg(s"${mon} flinched!")
|
||||
false
|
||||
onBeforeMovePriority: 8
|
||||
onResidualOrder: 13
|
||||
@@ -168,7 +132,7 @@ frz:
|
||||
mon.cureStatus()
|
||||
true
|
||||
} else {
|
||||
println(s"${mon} is completely frozen!")
|
||||
msg(s"${mon} is completely frozen!")
|
||||
false
|
||||
}
|
||||
onBeforeMovePriority: 10
|
||||
@@ -177,19 +141,9 @@ frz:
|
||||
target.cureStatus()
|
||||
}
|
||||
onStart: |-
|
||||
println(s"${mon} was frozen solid!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.effectType === 'Ability') {
|
||||
target.status = Status('frz', '[from] 'ability': ' + sourceEffect.name, '[of] ' + source);
|
||||
} else {
|
||||
target.status = Status('frz');
|
||||
}
|
||||
if (target.template.species === 'Shaymin-Sky' && target.baseTemplate.baseSpecies === 'Shaymin') {
|
||||
target.formeChange('Shaymin', this.effect, true);
|
||||
}
|
||||
*/
|
||||
msg(s"${mon} was frozen solid!")
|
||||
onEnd: |-
|
||||
println(s"${mon} thawed out.")
|
||||
msg(s"${mon} thawed out.")
|
||||
onModifyMove: |
|
||||
if (move.flags("defrost")) {
|
||||
mon.cureStatus()
|
||||
@@ -201,20 +155,13 @@ psn:
|
||||
num: 0
|
||||
effectType: 'Status'
|
||||
onStart: |
|
||||
println(s"${mon} was poisoned!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.effectType === 'Ability') {
|
||||
this.add('-status', target, 'psn', '[from] ability: ' + sourceEffect.name, '[of] ' + source);
|
||||
} else {
|
||||
this.add('-status', target, 'psn');
|
||||
}
|
||||
*/
|
||||
msg(s"${mon} was poisoned!")
|
||||
oneEnd: |
|
||||
println(s"${mon} was cured of its poison.")
|
||||
msg(s"${mon} was cured of its poison.")
|
||||
onResidualOrder: 9
|
||||
onResidual: |
|
||||
mon.takeDamage(mon(Hp) / 8);
|
||||
println(s"${mon} was damaged by poison!")
|
||||
msg(s"${mon} was damaged by poison!")
|
||||
|
||||
tox:
|
||||
name: 'tox'
|
||||
@@ -222,16 +169,8 @@ tox:
|
||||
num: 0
|
||||
effectType: 'Status'
|
||||
onStart: |
|
||||
println(s"${mon} was baddly poisoned!")
|
||||
msg(s"${mon} was baddly poisoned!")
|
||||
self.intData("stage") = 0;
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.id === 'toxicorb') {
|
||||
this.add('-status', target, 'tox', '[from] item: Toxic Orb');
|
||||
} else if (sourceEffect && sourceEffect.effectType === 'Ability') {
|
||||
this.add('-status', target, 'tox', '[from] ability: ' + sourceEffect.name, '[of] ' + source);
|
||||
} else {
|
||||
this.add('-status', target, 'tox');
|
||||
}*/
|
||||
onSwitchIn: |
|
||||
this.effectData.stage = 0;
|
||||
onResidualOrder: 9
|
||||
@@ -240,4 +179,4 @@ tox:
|
||||
self.intData("stage") += 1
|
||||
}
|
||||
mon.takeDamage(self.intData("stage") \\ 16 * mon(Hp));
|
||||
println(s"${mon} was damaged by poison!")
|
||||
msg(s"${mon} was damaged by poison!")
|
||||
|
||||
Reference in New Issue
Block a user