def pbReduceStatBasic(stat,increment,attacker=nil,moldbreaker=false,ignoreContrary=false[COLOR="red"],ignoreroleplayer=false[/COLOR])
if !moldbreaker # moldbreaker is true only when Roar forces out a Pokémon into Sticky Web
if !attacker || attacker.index==self.index || !attacker.hasMoldBreaker
if hasWorkingAbility(:CONTRARY) && !ignoreContrary
return pbIncreaseStatBasic(stat,increment,attacker,moldbreaker,true)
end
increment*=2 if hasWorkingAbility(:SIMPLE)
end
end
increment=[increment,6+@stages[stat]].min
PBDebug.log("[Stat change] #{pbThis}'s #{PBStats.getName(stat)} fell by #{increment} stage(s) (was #{@stages[stat]}, now #{@stages[stat]-increment})")
@stages[stat]-=increment
[COLOR="Red"]if !ignoreroleplayer
for i in 0...4
if @battle.battlers[i] != self &&
@battle.battlers[i].hasWorkingAbility(:ROLEPLAYER)
@battle.battlers[i].pbReduceStatBasic(stat,increment,nil,false,false,true)
end
end
end[/COLOR]
return increment
end