Remove the use of ugly label and some minor changes.

This commit is contained in:
jianmingyong 2016-10-03 11:42:26 +08:00
parent 8f1843a042
commit f3e1778cad
2 changed files with 64 additions and 68 deletions

View File

@ -189,7 +189,7 @@
End Sub End Sub
Private Sub DeleteHostQuery(ByVal BattleScreen As BattleScreen) Private Sub DeleteHostQuery(ByVal BattleScreen As BattleScreen)
If BattleScreen.IsRemoteBattle = True Then If BattleScreen.IsRemoteBattle Then
BattleScreen.BattleQuery.Clear() BattleScreen.BattleQuery.Clear()
BattleScreen.TempPVPBattleQuery.Clear() BattleScreen.TempPVPBattleQuery.Clear()
End If End If
@ -200,14 +200,14 @@
SelectedMoveOwn = True SelectedMoveOwn = True
SelectedMoveOpp = True SelectedMoveOpp = True
If BattleScreen.IsRemoteBattle = False Then If Not BattleScreen.IsRemoteBattle Then
StartMultiTurnAction(BattleScreen) StartMultiTurnAction(BattleScreen)
End If End If
'Going to menu: 'Going to menu:
BattleScreen.BattleQuery.Add(New ToggleMenuQueryObject(False)) BattleScreen.BattleQuery.Add(New ToggleMenuQueryObject(False))
If BattleScreen.IsRemoteBattle = True And BattleScreen.IsHost = True Then If BattleScreen.IsRemoteBattle AndAlso BattleScreen.IsHost Then
BattleScreen.BattleQuery.Add(New TriggerNewRoundPVPQueryObject()) BattleScreen.BattleQuery.Add(New TriggerNewRoundPVPQueryObject())
BattleScreen.SendHostQuery() BattleScreen.SendHostQuery()
@ -219,9 +219,9 @@
End Sub End Sub
Public Function GetOppStep(ByVal BattleScreen As BattleScreen, ByVal OwnStep As RoundConst) As RoundConst Public Function GetOppStep(ByVal BattleScreen As BattleScreen, ByVal OwnStep As RoundConst) As RoundConst
If BattleScreen.RoamingBattle = True Then If BattleScreen.RoamingBattle Then
BattleScreen.FieldEffects.RoamingFled = False BattleScreen.FieldEffects.RoamingFled = False
If BattleCalculation.CanSwitch(BattleScreen, False) = True Then If BattleCalculation.CanSwitch(BattleScreen, False) Then
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Flee, .Argument = BattleScreen.OppPokemon.GetDisplayName() & " fled!"} Return New RoundConst() With {.StepType = RoundConst.StepTypes.Flee, .Argument = BattleScreen.OppPokemon.GetDisplayName() & " fled!"}
End If End If
End If End If
@ -337,25 +337,25 @@
End If End If
'PVP action: 'PVP action:
If BattleScreen.IsRemoteBattle = True And BattleScreen.IsHost = True Then If BattleScreen.IsRemoteBattle AndAlso BattleScreen.IsHost Then
BattleScreen.OppStatistics.Turns += 1 BattleScreen.OppStatistics.Turns += 1
BattleScreen.OwnStatistics.Turns += 1 BattleScreen.OwnStatistics.Turns += 1
If BattleScreen.ReceivedInput.StartsWith("MOVE|") = True Then If BattleScreen.ReceivedInput.StartsWith("MOVE|") Then
BattleScreen.OppStatistics.Moves += 1 BattleScreen.OppStatistics.Moves += 1
Dim moveID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 5)) Dim moveID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 5))
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, moveID)} Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = GetPokemonMoveFromID(BattleScreen.OppPokemon, moveID)}
ElseIf BattleScreen.ReceivedInput.StartsWith("SWITCH|") = True Then ElseIf BattleScreen.ReceivedInput.StartsWith("SWITCH|") Then
BattleScreen.OppStatistics.Switches += 1 BattleScreen.OppStatistics.Switches += 1
Dim switchID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 7)) Dim switchID As Integer = CInt(BattleScreen.ReceivedInput.Remove(0, 7))
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Switch, .Argument = switchID.ToString()} Return New RoundConst() With {.StepType = RoundConst.StepTypes.Switch, .Argument = switchID.ToString()}
ElseIf BattleScreen.ReceivedInput.StartsWith("TEXT|") = True Then ElseIf BattleScreen.ReceivedInput.StartsWith("TEXT|") Then
Dim text As String = BattleScreen.ReceivedInput.Remove(0, 5) Dim text As String = BattleScreen.ReceivedInput.Remove(0, 5)
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Text, .Argument = text} Return New RoundConst() With {.StepType = RoundConst.StepTypes.Text, .Argument = text}
End If End If
End If End If
'AI move here: 'AI move here:
If BattleScreen.IsTrainerBattle = True And BattleScreen.IsRemoteBattle = False Then If BattleScreen.IsTrainerBattle AndAlso Not BattleScreen.IsRemoteBattle Then
Return TrainerAI.GetAIMove(BattleScreen, OwnStep) Return TrainerAI.GetAIMove(BattleScreen, OwnStep)
Else Else
Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = BattleScreen.OppPokemon.Attacks(Core.Random.Next(0, BattleScreen.OppPokemon.Attacks.Count))} Return New RoundConst() With {.StepType = RoundConst.StepTypes.Move, .Argument = BattleScreen.OppPokemon.Attacks(Core.Random.Next(0, BattleScreen.OppPokemon.Attacks.Count))}
@ -407,7 +407,7 @@
Sub DoMegaEvolution(ByVal BattleScreen As BattleScreen, ByVal own As Boolean) Sub DoMegaEvolution(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon
If own = False Then If Not own Then
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
End If End If
'Transform a Pokemon into it's Mega Evolution 'Transform a Pokemon into it's Mega Evolution
@ -424,18 +424,18 @@
'Checks if any pokemon is mega evolving, order based on speed 'Checks if any pokemon is mega evolving, order based on speed
Sub MegaEvolCheck(ByVal BattleScreen As BattleScreen) Sub MegaEvolCheck(ByVal BattleScreen As BattleScreen)
If BattleCalculation.MovesFirst(BattleScreen) = True Then If BattleCalculation.MovesFirst(BattleScreen) Then
If BattleScreen.IsMegaEvolvingOwn = True Then If BattleScreen.IsMegaEvolvingOwn Then
DoMegaEvolution(BattleScreen, True) DoMegaEvolution(BattleScreen, True)
End If End If
If BattleScreen.IsMegaEvolvingOpp = True Then If BattleScreen.IsMegaEvolvingOpp Then
DoMegaEvolution(BattleScreen, False) DoMegaEvolution(BattleScreen, False)
End If End If
Else Else
If BattleScreen.IsMegaEvolvingOpp = True Then If BattleScreen.IsMegaEvolvingOpp Then
DoMegaEvolution(BattleScreen, False) DoMegaEvolution(BattleScreen, False)
End If End If
If BattleScreen.IsMegaEvolvingOwn = True Then If BattleScreen.IsMegaEvolvingOwn Then
DoMegaEvolution(BattleScreen, True) DoMegaEvolution(BattleScreen, True)
End If End If
@ -447,7 +447,7 @@
Public Sub InitializeRound(ByVal BattleScreen As BattleScreen, ByVal OwnStep As RoundConst) Public Sub InitializeRound(ByVal BattleScreen As BattleScreen, ByVal OwnStep As RoundConst)
If BattleHasEnded(BattleScreen) = True Then If BattleHasEnded(BattleScreen) Then
Exit Sub Exit Sub
End If End If
@ -479,7 +479,7 @@
BattleScreen.OppPokemon.CalculateStats() BattleScreen.OppPokemon.CalculateStats()
BattleScreen.OwnPokemon.CalculateStats() BattleScreen.OwnPokemon.CalculateStats()
If first = True Then If first Then
DoAttackRound(BattleScreen, first, ownMove) DoAttackRound(BattleScreen, first, ownMove)
EndRound(BattleScreen, 1) EndRound(BattleScreen, 1)
DoAttackRound(BattleScreen, Not first, oppMove) DoAttackRound(BattleScreen, Not first, oppMove)
@ -909,15 +909,15 @@
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon Dim op As Pokemon = BattleScreen.OppPokemon
If own = False Then If Not own Then
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon op = BattleScreen.OwnPokemon
End If End If
'Transform Aegislash with Stance Change ability. 'Transform Aegislash with Stance Change ability.
If p.Ability.Name.ToLower() = "stance change" And p.Number = 681 Then If p.Ability.Name.ToLower() = "stance change" AndAlso p.Number = 681 Then
If p.AdditionalData = "" Then If p.AdditionalData = "" Then
If moveUsed.IsDamagingMove = True Then If moveUsed.IsDamagingMove Then
p.AdditionalData = "blade" p.AdditionalData = "blade"
p.ReloadDefinitions() p.ReloadDefinitions()
p.CalculateStats() p.CalculateStats()
@ -938,7 +938,7 @@
End If End If
'Turn count 'Turn count
If own = True Then If own Then
BattleScreen.FieldEffects.OwnTurnCounts += 1 BattleScreen.FieldEffects.OwnTurnCounts += 1
Else Else
BattleScreen.FieldEffects.OppTurnCounts += 1 BattleScreen.FieldEffects.OppTurnCounts += 1
@ -946,7 +946,7 @@
'Reset Destiny Bond: 'Reset Destiny Bond:
If moveUsed.ID <> 194 Then If moveUsed.ID <> 194 Then
If own = True Then If own Then
BattleScreen.FieldEffects.OwnDestinyBond = False BattleScreen.FieldEffects.OwnDestinyBond = False
Else Else
BattleScreen.FieldEffects.OppDestinyBond = False BattleScreen.FieldEffects.OppDestinyBond = False
@ -954,7 +954,7 @@
End If End If
If p.HP <= 0 Then If p.HP <= 0 Then
GoTo endthisround Exit Sub
End If End If
Dim q As CameraQueryObject = CType(BattleScreen.FocusBattle(), CameraQueryObject) : q.ApplyCurrentCamera = True : BattleScreen.BattleQuery.Add(q) Dim q As CameraQueryObject = CType(BattleScreen.FocusBattle(), CameraQueryObject) : q.ApplyCurrentCamera = True : BattleScreen.BattleQuery.Add(q)
@ -966,13 +966,13 @@
Else Else
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\effect_ice1", False)) BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\effect_ice1", False))
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is frozen solid!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is frozen solid!"))
GoTo endthisround Exit Sub
End If End If
End If End If
If p.Status = Pokemon.StatusProblems.Sleep Then If p.Status = Pokemon.StatusProblems.Sleep Then
Dim sleepTurns As Integer = BattleScreen.FieldEffects.OwnSleepTurns Dim sleepTurns As Integer = BattleScreen.FieldEffects.OwnSleepTurns
If own = False Then If Not own Then
sleepTurns = BattleScreen.FieldEffects.OppSleepTurns sleepTurns = BattleScreen.FieldEffects.OppSleepTurns
End If End If
@ -987,7 +987,7 @@
Else Else
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns") CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns")
BattleScreen.BattleQuery.Add(New TextQueryObject("Sleep Talk failed!")) BattleScreen.BattleQuery.Add(New TextQueryObject("Sleep Talk failed!"))
Return Exit Sub
End If End If
Else Else
If (own AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) OrElse (Not own AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then If (own AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) OrElse (Not own AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
@ -999,7 +999,7 @@
Else Else
If sleepTurns > 0 Then If sleepTurns > 0 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fast asleep.")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fast asleep."))
Return Exit Sub
Else Else
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns") CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " woke up!", "sleepturns")
End If End If
@ -1009,18 +1009,18 @@
If p.Ability.Name.ToLower() = "truant" Then If p.Ability.Name.ToLower() = "truant" Then
Dim truantTurn As Integer = BattleScreen.FieldEffects.OwnTruantRound Dim truantTurn As Integer = BattleScreen.FieldEffects.OwnTruantRound
If own = False Then If Not own Then
truantTurn = BattleScreen.FieldEffects.OppTruantRound truantTurn = BattleScreen.FieldEffects.OppTruantRound
End If End If
If truantTurn = 1 Then If truantTurn = 1 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " loafes around.")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " loafes around."))
GoTo endthisround Exit Sub
End If End If
End If End If
If moveUsed.Disabled > 0 Then If moveUsed.Disabled > 0 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(moveUsed.Name & " is disabled!")) BattleScreen.BattleQuery.Add(New TextQueryObject(moveUsed.Name & " is disabled!"))
GoTo endthisround Exit Sub
End If End If
Dim imprisoned As Integer = BattleScreen.FieldEffects.OwnImprison Dim imprisoned As Integer = BattleScreen.FieldEffects.OwnImprison
@ -1037,7 +1037,7 @@
Next Next
If hasMove = True Then If hasMove = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move is sealed by " & op.GetDisplayName() & "!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move is sealed by " & op.GetDisplayName() & "!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1048,7 +1048,7 @@
If healBlock > 0 Then If healBlock > 0 Then
If moveUsed.IsHealingMove = True Then If moveUsed.IsHealingMove = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " was prevented from healing!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " was prevented from healing!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1057,7 +1057,7 @@
If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True Then If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " prevented the sound-based move with Cacophony!")) BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " prevented the sound-based move with Cacophony!"))
moveUsed.MoveFailsSoundproof(own, BattleScreen) moveUsed.MoveFailsSoundproof(own, BattleScreen)
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1065,13 +1065,13 @@
If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True Then If BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " prevented the sound-based move with Soundproof!")) BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " prevented the sound-based move with Soundproof!"))
moveUsed.MoveFailsSoundproof(own, BattleScreen) moveUsed.MoveFailsSoundproof(own, BattleScreen)
GoTo endthisround Exit Sub
End If End If
End If End If
If op.Ability.Name.ToLower() = "sturdy" And moveUsed.IsOneHitKOMove = True Then If op.Ability.Name.ToLower() = "sturdy" And moveUsed.IsOneHitKOMove = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject("Sturdy prevented any damage from the 1-Hit-KO move.")) BattleScreen.BattleQuery.Add(New TextQueryObject("Sturdy prevented any damage from the 1-Hit-KO move."))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1093,7 +1093,7 @@
Dim a As Attack = New ConfusionAttack() Dim a As Attack = New ConfusionAttack()
Dim damage As Integer = BattleCalculation.CalculateDamage(a, False, True, True, BattleScreen) Dim damage As Integer = BattleCalculation.CalculateDamage(a, False, True, True, BattleScreen)
ReduceHP(damage, own, own, BattleScreen, p.GetDisplayName() & " hurt itself in confusion.", "confusiondamage") ReduceHP(damage, own, own, BattleScreen, p.GetDisplayName() & " hurt itself in confusion.", "confusiondamage")
GoTo endthisround Exit Sub
End If End If
End If End If
End If End If
@ -1116,7 +1116,7 @@
If p.Ability.Name.ToLower() = "steadfast" Then If p.Ability.Name.ToLower() = "steadfast" Then
RaiseStat(own, Not own, BattleScreen, "Speed", 1, "", "steadfast") RaiseStat(own, Not own, BattleScreen, "Speed", 1, "", "steadfast")
End If End If
GoTo endthisround Exit Sub
End If End If
Dim taunt As Integer = BattleScreen.FieldEffects.OwnTaunt Dim taunt As Integer = BattleScreen.FieldEffects.OwnTaunt
@ -1126,7 +1126,7 @@
If taunt > 0 Then If taunt > 0 Then
If moveUsed.Category = Attack.Categories.Status Then If moveUsed.Category = Attack.Categories.Status Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " move was prevented due to Taunt!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " move was prevented due to Taunt!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1134,7 +1134,7 @@
If gravity > 0 Then If gravity > 0 Then
If moveUsed.DisabledWhileGravity = True Then If moveUsed.DisabledWhileGravity = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " move was prevented due to Gravity!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " move was prevented due to Gravity!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1142,7 +1142,7 @@
If p.HasVolatileStatus(Pokemon.VolatileStatus.Infatuation) = True Then If p.HasVolatileStatus(Pokemon.VolatileStatus.Infatuation) = True Then
If Core.Random.Next(0, 2) = 0 Then If Core.Random.Next(0, 2) = 0 Then
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is in love with " & op.GetDisplayName() & "!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is in love with " & op.GetDisplayName() & "!"))
GoTo endthisround Exit Sub
End If End If
End If End If
End If End If
@ -1151,7 +1151,7 @@
If Core.Random.Next(0, 4) = 0 Then If Core.Random.Next(0, 4) = 0 Then
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\effect_thundershock2", False)) BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\effect_thundershock2", False))
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & vbNewLine & "It cannot move!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & vbNewLine & "It cannot move!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1173,29 +1173,29 @@
Select Case ObedienceCheck Select Case ObedienceCheck
Case 1 Case 1
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " ignores orders while asleep!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " ignores orders while asleep!"))
GoTo endthisround Exit Sub
Case 2 Case 2
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " ignores orders!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " ignores orders!"))
moveUsed = CType(GetAttack(BattleScreen, own, p.Attacks(Core.Random.Next(0, p.Attacks.Count))).Argument, Attack) moveUsed = CType(GetAttack(BattleScreen, own, p.Attacks(Core.Random.Next(0, p.Attacks.Count))).Argument, Attack)
GoTo endthisround Exit Sub
Case 3 Case 3
InflictSleep(own, own, BattleScreen, -1, p.GetDisplayName() & " began to nap!", "obeynap") InflictSleep(own, own, BattleScreen, -1, p.GetDisplayName() & " began to nap!", "obeynap")
GoTo endthisround Exit Sub
Case 4 Case 4
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " won't obey!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " won't obey!"))
GoTo endthisround Exit Sub
Case 5 Case 5
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " won't obey!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " won't obey!"))
GoTo endthisround Exit Sub
Case 6 Case 6
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " turned away!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " turned away!"))
GoTo endthisround Exit Sub
Case 7 Case 7
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is loafing around!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is loafing around!"))
GoTo endthisround Exit Sub
Case 8 Case 8
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " pretended to not notice!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " pretended to not notice!"))
GoTo endthisround Exit Sub
End Select End Select
End If End If
End If End If
@ -1223,7 +1223,7 @@
If moveUsed.Target <> Attack.Targets.Self And moveUsed.Target <> Attack.Targets.All Then If moveUsed.Target <> Attack.Targets.Self And moveUsed.Target <> Attack.Targets.All Then
If op.HP <= 0 Or op.Status = Pokemon.StatusProblems.Fainted Then If op.HP <= 0 Or op.Status = Pokemon.StatusProblems.Fainted Then
BattleScreen.BattleQuery.Add(New TextQueryObject("But there was no target...")) BattleScreen.BattleQuery.Add(New TextQueryObject("But there was no target..."))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1459,7 +1459,7 @@
If protectWorks = True Then If protectWorks = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!")) BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1477,7 +1477,7 @@
If detectWorks = True Then If detectWorks = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!")) BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & " protected itself!"))
GoTo endthisround Exit Sub
End If End If
End If End If
@ -1500,7 +1500,7 @@
Me.LowerStat(own, Not own, BattleScreen, "Attack", 2, "", "move:kingsshield") Me.LowerStat(own, Not own, BattleScreen, "Attack", 2, "", "move:kingsshield")
End If End If
GoTo endthisround Exit Sub
End If End If
End If End If
End If End If
@ -1520,7 +1520,7 @@
ChangeCameraAngel(2, own, BattleScreen) ChangeCameraAngel(2, own, BattleScreen)
If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then
BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & "s Wonder Guard blocked the attack!")) BattleScreen.BattleQuery.Add(New TextQueryObject(op.GetDisplayName() & "s Wonder Guard blocked the attack!"))
GoTo endthisround Exit Sub
End If End If
Dim Hits As Integer = 0 Dim Hits As Integer = 0
@ -2009,8 +2009,6 @@
End If End If
moveUsed.MoveMisses(own, BattleScreen) moveUsed.MoveMisses(own, BattleScreen)
End If End If
endthisround:
End Sub End Sub
''' <summary> ''' <summary>

View File

@ -230,17 +230,17 @@
End If End If
End Select End Select
If String.IsNullOrWhiteSpace(Core.Player.RoamingPokemonData) = False Then If Not String.IsNullOrWhiteSpace(Core.Player.RoamingPokemonData) Then
If Core.Player.RoamingPokemonData.Length > 0 AndAlso Core.Player.RoamingPokemonData.Contains("|") Then If Core.Player.RoamingPokemonData.Length > 0 AndAlso Core.Player.RoamingPokemonData.Contains("|") Then
For Each Pokes As String In Core.Player.RoamingPokemonData.SplitAtNewline For Each Pokes As String In Core.Player.RoamingPokemonData.SplitAtNewline
'PokémonID,Level,regionID,startLevelFile,MusicLoop,PokemonData 'PokémonID,Level,regionID,startLevelFile,MusicLoop,PokemonData
Dim TempData() As String = Pokes.Split(CChar("|")) Dim TempData() As String = Pokes.Split("|")
Dim MapFiles() As String = Tags("mapfiles").Split(CChar(",")) Dim MapFiles() As String = Tags("mapfiles").Split(",")
Dim PokeCurrentLocation As String = TempData(3) Dim PokeCurrentLocation As String = TempData(3)
If MapFiles.Contains(PokeCurrentLocation) Then If MapFiles.Contains(PokeCurrentLocation) Then
TempPoke.Add(New Roaming(CInt(TempData(0)), CInt(Tags("position").Split(CChar(","))(0)), CInt(Tags("position").Split(CChar(","))(1)), Tags("name"))) TempPoke.Add(New Roaming(CInt(TempData(0)), CInt(Tags("position").Split(",")(0)), CInt(Tags("position").Split(",")(1)), Tags("name")))
End If End If
If RoamingPokeName Is Nothing OrElse RoamingPokeName.Contains(Pokemon.GetPokemonByID(CInt(TempData(0))).GetName) = False Then If RoamingPokeName Is Nothing OrElse Not RoamingPokeName.Contains(Pokemon.GetPokemonByID(CInt(TempData(0))).GetName) Then
RoamingPokeName.Add(Pokemon.GetPokemonByID(CInt(TempData(0))).GetName) RoamingPokeName.Add(Pokemon.GetPokemonByID(CInt(TempData(0))).GetName)
End If End If
Next Next
@ -252,7 +252,6 @@
If TempPoke.Count > 0 And RoamingPokeName.Count > 0 Then If TempPoke.Count > 0 And RoamingPokeName.Count > 0 Then
For Each Pokes As String In RoamingPokeName For Each Pokes As String In RoamingPokeName
Dim MapObject As List(Of Roaming) = (From p As Roaming In TempPoke Where p.Name = Pokes Order By p.Distance Ascending).ToList() Dim MapObject As List(Of Roaming) = (From p As Roaming In TempPoke Where p.Name = Pokes Order By p.Distance Ascending).ToList()
If MapObject IsNot Nothing AndAlso Not MapObject.Count = 0 Then If MapObject IsNot Nothing AndAlso Not MapObject.Count = 0 Then
RoamingPoke.Add(MapObject.ElementAt(MapObject(0).getSkipIndex)) RoamingPoke.Add(MapObject.ElementAt(MapObject(0).getSkipIndex))
End If End If
@ -476,8 +475,7 @@
If drawObjects(3) = True Then If drawObjects(3) = True Then
For Each Pokes As Roaming In RoamingPoke For Each Pokes As Roaming In RoamingPoke
Dim c As Color = Color.White Core.SpriteBatch.Draw(Pokes.getTexture(), Pokes.getRectangle(mapOffset), Color.White)
Core.SpriteBatch.Draw(Pokes.getTexture(objectsTexture), Pokes.getRectangle(mapOffset), c)
Next Next
End If End If
@ -1086,7 +1084,7 @@
Me.PositionX = PositionX Me.PositionX = PositionX
Me.PositionY = PositionY Me.PositionY = PositionY
Me.Location = Location Me.Location = Location
Me.Distance = Math.Pow(Math.Pow(PositionX, 2) + Math.Pow(PositionY, 2), 0.5) ' (x^2 + y^2)^0.5 Me.Distance = Math.Pow(Math.Pow(PositionX, 2) + Math.Pow(PositionY, 2), 0.5)
End Sub End Sub
Public Function getPosition() As Vector2 Public Function getPosition() As Vector2
@ -1103,7 +1101,7 @@
Return New Rectangle(CInt(Me.getPosition().X + offset.X), CInt(Me.getPosition().Y + offset.Y), sizeX, sizeY) Return New Rectangle(CInt(Me.getPosition().X + offset.X), CInt(Me.getPosition().Y + offset.Y), sizeX, sizeY)
End Function End Function
Public Function getTexture(ByVal FullTexture As Texture2D) As Texture2D Public Function getTexture() As Texture2D
Dim Texture As Texture2D = TextureManager.GetTexture("GUI\PokemonMenu") Dim Texture As Texture2D = TextureManager.GetTexture("GUI\PokemonMenu")
Dim IndexX As Integer = 0 Dim IndexX As Integer = 0
Dim IndexY As Integer = 0 Dim IndexY As Integer = 0