Class: RPG::Event::Page::Condition
- Defined in:
- scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb
Instance Attribute Summary collapse
-
#self_switch_ch
Returns the value of attribute self_switch_ch.
-
#self_switch_valid
Returns the value of attribute self_switch_valid.
-
#switch1_id
Returns the value of attribute switch1_id.
-
#switch1_valid
Returns the value of attribute switch1_valid.
-
#switch2_id
Returns the value of attribute switch2_id.
-
#switch2_valid
Returns the value of attribute switch2_valid.
-
#variable_id
Returns the value of attribute variable_id.
-
#variable_valid
Returns the value of attribute variable_valid.
-
#variable_value
Returns the value of attribute variable_value.
Instance Method Summary collapse
-
#valid?(map_id, event_id) ⇒ Boolean
Return if the page condition is currently valid.
Instance Attribute Details
#self_switch_ch
Returns the value of attribute self_switch_ch.
115 116 117 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 115 def self_switch_ch @self_switch_ch end |
#self_switch_valid
Returns the value of attribute self_switch_valid.
110 111 112 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 110 def self_switch_valid @self_switch_valid end |
#switch1_id
Returns the value of attribute switch1_id.
111 112 113 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 111 def switch1_id @switch1_id end |
#switch1_valid
Returns the value of attribute switch1_valid.
107 108 109 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 107 def switch1_valid @switch1_valid end |
#switch2_id
Returns the value of attribute switch2_id.
112 113 114 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 112 def switch2_id @switch2_id end |
#switch2_valid
Returns the value of attribute switch2_valid.
108 109 110 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 108 def switch2_valid @switch2_valid end |
#variable_id
Returns the value of attribute variable_id.
113 114 115 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 113 def variable_id @variable_id end |
#variable_valid
Returns the value of attribute variable_valid.
109 110 111 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 109 def variable_valid @variable_valid end |
#variable_value
Returns the value of attribute variable_value.
114 115 116 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 114 def variable_value @variable_value end |
Instance Method Details
#valid?(map_id, event_id) ⇒ Boolean
Return if the page condition is currently valid
98 99 100 101 102 103 104 105 106 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/99999 RMXP_DATA.rb', line 98 def valid?(map_id, event_id) return false if @switch1_valid && !$game_switches[@switch1_id] return false if @switch2_valid && !$game_switches[@switch2_id] return false if @variable_valid && $game_variables[@variable_id] < @variable_value if @self_switch_valid return false unless $game_self_switches[[map_id, event_id, @self_switch_ch]] end return true end |