Connected the battle engine to the UI. Beginning to make messages appear in the UI
This commit is contained in:
@@ -13,7 +13,7 @@ brn:
|
||||
if (!source.isMove) {
|
||||
print(s"[${source.mon}'s ${source.effect}]")
|
||||
}
|
||||
println(s"${mon} was burned!")
|
||||
msg(s"${mon} was burned!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.id === 'flameorb') {
|
||||
target.status = Status('brn', '[from] 'item': Flame Orb');
|
||||
@@ -45,7 +45,7 @@ confusion:
|
||||
val maxDmg = (2 * mon.level / 5 + 2) * 40 * mon(PAtk) / (mon(PDef) * 50) + 2
|
||||
val minDmg = (17 \\ 20) * maxDmg
|
||||
val dmg = rng.nextInt(minDmg, maxDmg)
|
||||
println(s"${mon} hurt itself in its confusion.")
|
||||
msg(s"${mon} hurt itself in its confusion.")
|
||||
mon.takeDamage(dmg)
|
||||
false
|
||||
} else {
|
||||
@@ -65,7 +65,7 @@ confusion:
|
||||
onBeforeMovePriority: 3
|
||||
onEnd: println(s"${mon} snapped out of its confusion.")
|
||||
onStart: |-
|
||||
println(s"${mon} was confused!")
|
||||
msg(s"${mon} was confused!")
|
||||
/*
|
||||
if (sourceEffect && sourceEffect.id === 'lockedmove') {
|
||||
this.add('-start', target, 'confusion', '[fatigue]');
|
||||
@@ -102,7 +102,7 @@ par:
|
||||
onBeforeMovePriority: 1
|
||||
onBeforeMove: |
|
||||
if (rng.chance(1, 4)) {
|
||||
println(s"${mon} is fully paralyzed!")
|
||||
msg(s"${mon} is fully paralyzed!")
|
||||
false
|
||||
} else {
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user