mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Added more stats, added script variables, fixed AI thinking Wonder Guard provides total immunity, releasing a Pokémon puts its held item in the Bag, tweaked new map Compiler
This commit is contained in:
@@ -79,13 +79,19 @@ class Game_Event < Game_Character
|
||||
end
|
||||
|
||||
def switchIsOn?(id)
|
||||
switchname = $data_system.switches[id]
|
||||
return false if !switchname
|
||||
if switchname[/^s\:/]
|
||||
switch_name = $data_system.switches[id]
|
||||
if switch_name && switch_name[/^s\:/]
|
||||
return eval($~.post_match)
|
||||
else
|
||||
return $game_switches[id]
|
||||
end
|
||||
return $game_switches[id]
|
||||
end
|
||||
|
||||
def variableIsLessThan?(id, value)
|
||||
variable_name = $data_system.variables[id]
|
||||
if variable_name && variable_name[/^s\:/]
|
||||
return eval($~.post_match) < value
|
||||
end
|
||||
return $game_variables[id] < value
|
||||
end
|
||||
|
||||
def variable
|
||||
@@ -208,7 +214,7 @@ class Game_Event < Game_Character
|
||||
c = page.condition
|
||||
next if c.switch1_valid && !switchIsOn?(c.switch1_id)
|
||||
next if c.switch2_valid && !switchIsOn?(c.switch2_id)
|
||||
next if c.variable_valid && $game_variables[c.variable_id] < c.variable_value
|
||||
next if c.variable_valid && variableIsLessThan?(c.variable_id, c.variable_value)
|
||||
if c.self_switch_valid
|
||||
key = [@map_id, @event.id, c.self_switch_ch]
|
||||
next if $game_self_switches[key] != true
|
||||
|
||||
@@ -28,12 +28,13 @@ class GameStats
|
||||
attr_accessor :eggs_hatched
|
||||
attr_accessor :evolution_count, :evolutions_cancelled
|
||||
attr_accessor :trade_count
|
||||
attr_accessor :pokemon_release_count
|
||||
attr_accessor :moves_taught_by_item, :moves_taught_by_tutor, :moves_taught_by_reminder
|
||||
attr_accessor :day_care_deposits, :day_care_levels_gained
|
||||
attr_accessor :pokerus_infections
|
||||
attr_accessor :shadow_pokemon_purified
|
||||
# Battles
|
||||
attr_accessor :wild_battles_won, :wild_battles_lost # Lost includes fled from
|
||||
attr_accessor :wild_battles_won, :wild_battles_lost, :wild_battles_fled # Fled counts both player and wild Pokémon fleeing
|
||||
attr_accessor :trainer_battles_won, :trainer_battles_lost
|
||||
attr_accessor :total_exp_gained
|
||||
attr_accessor :battle_money_gained, :battle_money_lost
|
||||
@@ -101,6 +102,7 @@ class GameStats
|
||||
@evolution_count = 0
|
||||
@evolutions_cancelled = 0
|
||||
@trade_count = 0
|
||||
@pokemon_release_count = 0
|
||||
@moves_taught_by_item = 0
|
||||
@moves_taught_by_tutor = 0
|
||||
@moves_taught_by_reminder = 0
|
||||
@@ -111,6 +113,7 @@ class GameStats
|
||||
# Battles
|
||||
@wild_battles_won = 0
|
||||
@wild_battles_lost = 0
|
||||
@wild_battles_fled = 0
|
||||
@trainer_battles_won = 0
|
||||
@trainer_battles_lost = 0
|
||||
@total_exp_gained = 0
|
||||
|
||||
Reference in New Issue
Block a user