mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-24 23:35:59 +00:00
Coded some Gen 9 ability/item/move effects
This commit is contained in:
@@ -342,19 +342,16 @@ class Battle::Move::StartPsychicTerrain < Battle::Move
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Removes the current terrain. Fails if there is no terrain in effect.
|
||||
# (Steel Roller)
|
||||
# Removes the current terrain. (Ice Spinner)
|
||||
#===============================================================================
|
||||
class Battle::Move::RemoveTerrain < Battle::Move
|
||||
def pbMoveFailed?(user, targets)
|
||||
if @battle.field.terrain == :None
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
# NOTE: Bulbapedia claims that Ice Spinner shouldn't remove terrain if the
|
||||
# user faints because of its Life Orb or is switched out by Red Card.
|
||||
# I can't find any evidence of this. Also, those items trigger at the
|
||||
# very end of a move's use, way after move effects usually happen. I'm
|
||||
# treating Bulbapedia's claim as a mistake and ignoring it.
|
||||
def pbEffectGeneral(user)
|
||||
return if user.fainted?
|
||||
case @battle.field.terrain
|
||||
when :Electric
|
||||
@battle.pbDisplay(_INTL("The electricity disappeared from the battlefield."))
|
||||
@@ -369,6 +366,20 @@ class Battle::Move::RemoveTerrain < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Removes the current terrain. Fails if there is no terrain in effect.
|
||||
# (Steel Roller)
|
||||
#===============================================================================
|
||||
class Battle::Move::RemoveTerrainFailsIfNoTerrain < Battle::Move::RemoveTerrain
|
||||
def pbMoveFailed?(user, targets)
|
||||
if @battle.field.terrain == :None
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Entry hazard. Lays spikes on the opposing side (max. 3 layers). (Spikes)
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user