mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 07:35:00 +00:00
Snowstorm, forfeiting trainer battles, battle outcome values
This commit is contained in:
@@ -205,7 +205,7 @@ class BattleChallengeData
|
||||
def pbStart(t, numRounds)
|
||||
@inProgress = true
|
||||
@resting = false
|
||||
@decision = 0
|
||||
@decision = Battle::Outcome::UNDECIDED
|
||||
@swaps = t.currentSwaps
|
||||
@wins = t.currentWins
|
||||
@battleNumber = 1
|
||||
@@ -251,7 +251,7 @@ class BattleChallengeData
|
||||
end
|
||||
|
||||
def pbMatchOver?
|
||||
return true if !@inProgress || @decision != 0
|
||||
return true if !@inProgress || @decision != Battle::Outcome::UNDECIDED
|
||||
return @battleNumber > @numRounds
|
||||
end
|
||||
|
||||
@@ -275,7 +275,7 @@ class BattleChallengeData
|
||||
def pbEnd
|
||||
$player.party = @oldParty
|
||||
return if !@inProgress
|
||||
save = (@decision != 0)
|
||||
save = (@decision != Battle::Outcome::UNDECIDED)
|
||||
reset
|
||||
$game_map.need_refresh = true
|
||||
Game.save(safe: true) if save
|
||||
@@ -293,7 +293,7 @@ class BattleChallengeData
|
||||
@inProgress = false
|
||||
@resting = false
|
||||
@start = nil
|
||||
@decision = 0
|
||||
@decision = Battle::Outcome::UNDECIDED
|
||||
@wins = 0
|
||||
@swaps = 0
|
||||
@battleNumber = 0
|
||||
@@ -343,11 +343,11 @@ class BattleChallengeType
|
||||
end
|
||||
|
||||
def saveWins(challenge)
|
||||
if challenge.decision == 0 # if undecided
|
||||
if challenge.decision == Battle::Outcome::UNDECIDED
|
||||
@currentWins = 0
|
||||
@currentSwaps = 0
|
||||
else
|
||||
if challenge.decision == 1 # if won
|
||||
if challenge.decision == Battle::Outcome::WIN
|
||||
@currentWins = challenge.wins
|
||||
@currentSwaps = challenge.swaps
|
||||
else # if lost
|
||||
|
||||
Reference in New Issue
Block a user