Class: Battle::Move
Overview
Generic class describing a move
Direct Known Subclasses
AbilityChanging, AbilitySwap, Absorb, Acupressure, AddThirdType, AfterYou, AllySwitch, AquaRing, Assist, Attract, Autotomize, Basic, BatonPass, BeatUp, BellyDrum, Bestow, Camouflage, Captivate, ChangeType, Charge, ChillyReception, ClangorousSoul, CorrosiveGas, CourtChange, CraftyShield, Curse, Defog, DestinyBond, Disable, DoNothing, DragonCheer, Electrify, Embargo, Encore, FinalGambit, FlowerShield, FocusEnergy, FollowMe, Foresight, FutureSight, GastroAcid, GearUp, Gravity, Grudge, HappyHour, HealBell, HealBlock, HealMove, HealingSacrifice, HelpingHand, Imprison, Ingrain, Instruct, IonDeluge, LaserFocus, LeechSeed, LockOn, LuckyChant, MagicCoat, MagicRoom, MagnetRise, MagneticFlux, MeFirst, Memento, Metronome, Mimic, Minimize, MiracleEye, MirrorMove, Mist, MudSport, NaturePower, Nightmare, NoRetreat, PainSplit, PartingShot, PerishSong, Powder, Protect, PsychUp, PsychoShift, Purify, Quash, Recycle, Reflect, ReflectType, Rest, Rototiller, Safeguard, Sketch, SleepTalk, Snatch, Spikes, Spite, Splash, StatAndStageEdit, StatusStat, StealthRock, StickyWeb, Stockpile, StrengthSap, StuffCheeks, Switcheroo, Tailwind, TakeHeart, Taunt, Teatime, Telekinesis, Teleport, TerrainMove, TopsyTurvy, Torment, ToxicSpikes, ToxicThread, TrickRoom, UTurn, VenomDrench, WeatherMove, Wish, WonderRoom, Yawn
Defined Under Namespace
Modules: Mechanics Classes: AbilityChanging, AbilitySwap, Absorb, Acrobatics, Acupressure, AddThirdType, AfterYou, AlluringVoice, AllySwitch, AquaRing, Assist, Assurance, Attract, AuraWheel, Autotomize, Avalanche, BaddyBad, Basic, BasicWithSuccessfulEffect, BatonPass, BeakBlast, BeatUp, Belch, BellyDrum, Bestow, Bide, Bind, BodyPress, BrickBreak, Brine, BurnUp, BurningJealousy, Camouflage, CantSwitch, Captivate, CeaselessEdge, ChangeType, Charge, ChillyReception, ClangorousSoul, Conversion, Conversion2, CoreEnforcer, CorrosiveGas, Counter, CounterBase, CourtChange, CraftyShield, Curse, CustomStatsBased, Defog, DestinyBond, Disable, DoNothing, Doodle, DoubleIronBash, DragonCheer, DragonDarts, EchoedVoice, EerieSpell, Electrify, ElectroBall, ElectroShot, Embargo, Encore, Endeavor, Entrainment, Eruption, ExpandingForce, Facade, FakeOut, FalseSwipe, Fangs, Feint, FellStinger, FickleBeam, FilletAway, FinalGambit, FishiousRend, FixedDamages, Flail, FlameBurst, Fling, FloralHealing, FlowerShield, FlyingPress, FocusEnergy, FocusPunch, FollowMe, ForceSwitch, Foresight, FoulPlay, FreezyFrost, Frustration, FullCrit, FuryCutter, FusionBolt, FusionFlare, FutureSight, GastroAcid, GearUp, GeniesStorm, Geomancy, GigatonHammer, GlaiveRush, GlitzyGlow, GrassyGlide, GravApple, Gravity, Growth, Grudge, GuardSplit, GuardSwap, GyroBall, HPEqLevel, HappyHour, HardPress, Haze, HealBell, HealBlock, HealMove, HealWeather, HealingSacrifice, HealingWish, HeartSwap, HeavySlam, HelpingHand, Hex, HiddenPower, HighJumpKick, HitThenCureStatus, IceBall, IceSpinner, Imprison, Incinerate, InfernalParade, Ingrain, Instruct, IonDeluge, IvyCudgel, JawLock, Judgment, JungleHealing, KnockOff, LaserFocus, LashOut, LastResort, LastRespects, LeechSeed, LifeDew, LockOn, LowKick, LuckyChant, LunarDance, MagicCoat, MagicPowder, MagicRoom, MagnetRise, MagneticFlux, Magnitude, MakeItRain, MeFirst, Memento, MetalBurst, Metronome, Mimic, MindBlown, Minimize, MiracleEye, MirrorCoat, MirrorMove, Mist, MistyExplosion, MudSport, MultiAttack, MultiHit, NaturalGift, NaturePower, Nightmare, NoRetreat, OHKO, Octolock, OrderUp, PainSplit, PartingShot, PayBack, PayDay, PerishSong, PhotonGeyser, PlasmaFists, Pledge, Pluck, PollenPuff, Poltergeist, PopulationBomb, Powder, PowerSplit, PowerSwap, PowerTrick, PreAttackBase, Present, Protect, PsychUp, PsychicNoise, PsychoShift, Psywave, Purify, Pursuit, Quash, Rage, RageFist, RagingBull, RapidSpin, RecoilMove, Recycle, Reflect, ReflectType, RelicSong, Reload, Rest, Retaliate, Return, RevelationDance, Revenge, RisingVoltage, Rollout, Roost, Rototiller, Round, SacredSword, Safeguard, SaltCure, SappySeed, ScaleShot, SecretPower, SelfDestruct, SelfStat, SelfStatus, ShedTail, ShellSideArm, ShellTrap, ShoreUp, SimpleBeam, Sketch, SkyDrop, SleepTalk, SmackDown, SmellingSalts, Snatch, Snore, SolarBeam, SparklingAria, SparklySwirl, SpectralThief, SpeedSwap, Spikes, SpitUp, Spite, Splash, StatAndStageEdit, StatAndStageEditBypassAccuracy, StatusBoostedMove, StatusStat, StealthRock, SteelRoller, StickyWeb, Stockpile, Stomp, StompingTantrum, StoneAxe, StoredPower, StrengthSap, Struggle, StuffCheeks, Substitute, SuckerPunch, SuperDuperEffective, SuperFang, Swallow, Switcheroo, Synchronoise, SyrupBomb, Tailwind, TakeHeart, TarShot, Taunt, Teatime, TechnoBlast, Telekinesis, Teleport, TerrainBoosting, TerrainMove, TerrainPulse, Thief, Thrash, ThreeHit, ThroatChop, Thunder, TidyUp, TopsyTurvy, Torment, ToxicSpikes, ToxicThread, Transform, TriAttack, TrickRoom, TripleArrows, TripleKick, TrumpCard, TwoHit, TwoTurnBase, UTurn, UpRoar, UpperHand, VenomDrench, Venoshock, WakeUpSlap, WaterShuriken, WeatherBall, WeatherMove, Wish, WonderRoom, WorrySeed, WringOut, Yawn
Constant Summary collapse
- REGISTERED_MOVES =
Returns list of the registered moves.
Hash.new(Move)
- R_RANGE =
Range of the R random factor
85..100
- OneTarget =
List of symbol describe a one target aim
%i[any_other_pokemon random_foe adjacent_pokemon adjacent_foe user user_or_adjacent_ally adjacent_ally]
- TargetNoAsk =
List of symbol that doesn’t show any choice of target
%i[adjacent_all_foe all_foe adjacent_all_pokemon all_pokemon user all_ally all_ally_but_user random_foe]
Instance Attribute Summary collapse
-
#consecutive_use_count ⇒ Integer
Number of time the move was used consecutively.
-
#damage_dealt ⇒ Integer
Number of damage dealt last time the move was used (to be used with move history).
-
#effectiveness
readonly
Get the effectiveness.
-
#forced_next_move_decrease_pp ⇒ Boolean
Tell if forced next move decreases PP.
-
#id ⇒ Integer
readonly
ID of the move in the database.
- #logic ⇒ Battle::Logic readonly
- #original ⇒ Battle::Move
-
#original_target ⇒ Array<PFM::PokemonBattler>
The original target of the move (to be used with Magic Bounce/Coat).
-
#pp ⇒ Integer
Number of pp the move currently has.
-
#ppmax ⇒ Integer
readonly
Maximum number of ppg the move currently has.
- #scene ⇒ Battle::Scene readonly
-
#thrown_item_effect ⇒ Battle::Effects::Item?
readonly
Get the item effect of the thrown item (to be used with Fling).
-
#used ⇒ Boolean
if the move has been used.
-
#user ⇒ PFM::PokemonBattler?
readonly
Get the user of the move.
Class Method Summary collapse
-
.[](symbol) ⇒ Class<Battle::Move>
Retrieve a registered move.
-
.register(symbol, klass)
Register a move.
-
.register_move_disabled_check_hook(reason) {|user, move| ... }
Function that registers a move_disabled_check hook.
-
.register_move_prevention_target_hook(reason) {|user, target, move| ... }
Function that registers a move_prevention_target hook.
-
.register_move_prevention_user_hook(reason) {|user, targets, move| ... }
Function that registers a move_prevention_user hook.
-
.register_move_type_change_hook(reason) {|user, target, move, type| ... }
Function that registers a move_type_change hook.
-
.register_single_type_multiplier_overwrite_hook(reason) {|target, target_type, type, move| ... }
Function that registers a single_type_multiplier_overwrite hook.
Instance Method Summary collapse
-
#accuracy ⇒ Integer
Return the current accuracy of the move.
-
#accuracy_mod(user) ⇒ Float
Return the accuracy modifier of the user.
-
#accuracy_text ⇒ String
Return the accuracy text of the skill (for the UI).
-
#atk_class ⇒ Integer
Return the class of the skill (used by the UI).
-
#authentic? ⇒ Boolean
Tell if the move is a move that can bypass Substitute.
-
#ballistics? ⇒ Boolean
Tell if the move is a ballistic move.
-
#battle_stage_mod ⇒ Array<Studio::Move::BattleStageMod>
Return the stat stage modifier the skill can apply.
-
#battler_targets(pokemon, logic) ⇒ Array<PFM::PokemonBattler>
List the targets of this move.
-
#be_method ⇒ Symbol
(also: #symbol)
Return the battle engine method of the move.
-
#bite? ⇒ Boolean
Tell if the move is biting move.
-
#blocable? ⇒ Boolean
Is the skill blocable by Protect and skill like that ?.
-
#blocked_by?(target, symbol) ⇒ Boolean
Detect if the move is protected by another move on target.
-
#bypass_chance_of_hit?(user, target) ⇒ Boolean
Check if the move bypass chance of hit and cannot fail.
-
#calc_stab(user, types) ⇒ Numeric
STAB calculation.
-
#chance_of_hit(user, target) ⇒ Float
Return the chance of hit of the move.
-
#check_specific_procedure(user, targets) ⇒ Symbol?
Check if an Effects imposes a specific proceed_internal.
-
#clone
Clone the move and give a reference to the original one.
-
#critical_hit? ⇒ Boolean
Was the move a critical hit.
-
#critical_rate ⇒ Integer
Return the critical rate index of the skill.
-
#damages(user, target) ⇒ Integer
Method calculating the damages done by the actual move.
-
#dance? ⇒ Boolean
Tell if the move is a dance move.
-
#data ⇒ Studio::Move
Return the data of the skill.
-
#db_symbol ⇒ Symbol
Return the symbol of the move in the database.
-
#deal_effect_sheer_force(user, actual_targets)
Function that deals the effect to the pokemon.
-
#definitive_types(user, target) ⇒ Array<Integer>
Get the types of the move with 1st type being affected by effects.
-
#description ⇒ String
Return the skill description.
-
#direct? ⇒ Boolean
Is the skill direct ?.
-
#disable_reason(user) ⇒ #call
Get the reason why the move is disabled.
-
#disabled?(user) ⇒ Boolean
Function that tells if the move is disabled.
-
#drain_factor ⇒ Integer
Returns the drain factor.
-
#effect_chance ⇒ Integer
Return the chance of effect of the skill.
-
#efficent_message(effectiveness, target)
Show the effectiveness message.
-
#evasion_mod(target) ⇒ Float
Return the evasion modifier of the target.
-
#force_switch? ⇒ Boolean
Tell if the move is a move that forces target switch.
-
#gravity_affected? ⇒ Boolean
Is the skill affected by gravity.
-
#heal? ⇒ Boolean
Tell if the move is a heal move.
-
#initialize(db_symbol, pp, ppmax, scene) ⇒ Move
constructor
Create a new move.
-
#magic_coat_affected? ⇒ Boolean
Is the skill affected by magic coat ?.
-
#mental? ⇒ Boolean
Tell if the move is a mental move.
-
#mirror_move_affected? ⇒ Boolean
Is the skill affected by Mirror Move.
-
#move_blocked_by_target?(user, target) ⇒ Boolean
Function that tests if the targets blocks the move.
-
#move_usable_by_user(user, targets) ⇒ Boolean
Function that tests if the user is able to use the move.
-
#multi_hit? ⇒ Boolean
Tells if the move hits multiple times.
-
#multi_turn? ⇒ Boolean
Tell if the move will take two or more turns.
-
#name
Return the name of the skill.
-
#no_choice_skill? ⇒ Boolean
(also: #is_no_choice_skill?)
Does the skill doesn’t show a target choice.
-
#not_very_effective? ⇒ Boolean
Was the move not very effective ?.
-
#ohko? ⇒ Boolean
Tell if the move is an OHKO move.
-
#one_target? ⇒ Boolean
(also: #is_one_target?)
Does the skill aim only one Pokemon.
-
#one_target_from_zone_attack(user) ⇒ Boolean
Check if an attack that targets multiple people is targeting only one.
-
#physical? ⇒ Boolean
Is the skill physical ?.
-
#powder? ⇒ Boolean
Tell if the move is a powder move.
-
#power ⇒ Integer
(also: #base_power)
Return the actual base power of the move.
-
#power_text ⇒ String
Return the text of the power of the skill (for the UI).
-
#pp_text ⇒ String
Return the text of the PP of the skill.
-
#pre_attack? ⇒ Boolean
Is the move doing something before any other moves ?.
-
#priority(user = nil) ⇒ Integer
Return the priority of the skill.
-
#proceed(user, target_bank, target_position)
Function starting the move procedure.
-
#proceed_internal_dancer(user, targets)
Internal procedure of the move.
-
#proceed_internal_parental_bond(user, targets)
Internal procedure of the move for Parental Bond Ability.
-
#proceed_internal_sheer_force(user, targets)
Internal procedure of the move for Sheer Force Ability.
-
#proceed_pre_attack(user)
Proceed the procedure before any other attack.
-
#pulse? ⇒ Boolean
Tell if the move is a pulse move.
-
#punching? ⇒ Boolean
Is the skill a punching move ?.
-
#real_base_power(user, target) ⇒ Integer
Get the real base power of the move (taking in account all parameter).
-
#recharge? ⇒ Boolean
Tell if the move is a move is a recharge move.
-
#recoil? ⇒ Boolean
Does the skill has recoil ?.
-
#recoil_factor ⇒ Integer
Returns the recoil factor.
-
#relative_priority
Move priority.
-
#self_user_switch? ⇒ Boolean
Tell if the move is a move that switch the user if that hit.
-
#show_usage_failure(user)
Show the usage failure when move is not usable by user.
-
#slicing_attack? ⇒ Boolean
Is the skill a slicing attack ?.
-
#snatchable? ⇒ Boolean
Is the skill snatchable ?.
-
#sound_attack? ⇒ Boolean
Is the skill a sound attack ?.
-
#special? ⇒ Boolean
Is the skill special ?.
-
#status? ⇒ Boolean
Is the skill status ?.
-
#status_effects ⇒ Array<Studio::Move::MoveStatus>
Get all the status effect of a move.
-
#super_effective? ⇒ Boolean
Was the move super effective ?.
-
#target ⇒ Symbol
Return the target symbol the skill can aim.
-
#to_s ⇒ String
(also: #inspect)
Format move for logging purpose.
-
#trigger_king_rock? ⇒ Boolean
Does the skill trigger the king rock.
-
#two_turn? ⇒ Boolean
Tell if the move is a two turn move.
-
#type ⇒ Integer
Return the current type of the move.
-
#type?(type_id) ⇒ Boolean
Is the skill a specific type ?.
-
#type_dark? ⇒ Boolean
(also: #type_tenebre?)
Is the skill type dark ?.
-
#type_dragon? ⇒ Boolean
Is the skill type dragon ?.
-
#type_electric? ⇒ Boolean
(also: #type_electrique?)
Is the skill type electric ?.
-
#type_fairy? ⇒ Boolean
(also: #type_fee?)
Is the skill type fairy ?.
-
#type_fighting? ⇒ Boolean
(also: #type_combat?)
Is the skill type fighting ?.
-
#type_fire? ⇒ Boolean
(also: #type_feu?)
Is the skill type fire ?.
-
#type_flying? ⇒ Boolean
(also: #type_vol?, #type_fly?)
Is the skill type fly ?.
-
#type_ghost? ⇒ Boolean
(also: #type_spectre?)
Is the skill type ghost ?.
-
#type_grass? ⇒ Boolean
(also: #type_plante?)
Is the skill type grass ?.
-
#type_ground? ⇒ Boolean
(also: #type_sol?)
Is the skill type ground ?.
-
#type_ice? ⇒ Boolean
(also: #type_glace?)
Is the skill type ice ?.
-
#type_insect? ⇒ Boolean
(also: #type_bug?)
Is the skill type insect/bug ?.
-
#type_modifier(user, target) ⇒ Float
Function that calculate the type modifier (for specific uses).
-
#type_normal? ⇒ Boolean
Is the skill type normal ?.
-
#type_poison? ⇒ Boolean
Is the skill type poison ?.
-
#type_psychic? ⇒ Boolean
(also: #type_psy?)
Is the skill type psy ?.
-
#type_rock? ⇒ Boolean
(also: #type_roche?)
Is the skill type rock ?.
-
#type_steel? ⇒ Boolean
(also: #type_acier?)
Is the skill type steel ?.
-
#type_water? ⇒ Boolean
(also: #type_eau?)
Is the skill type water ?.
-
#typeless? ⇒ Boolean
Is the skill typeless ?.
-
#unfreeze? ⇒ Boolean
Does the skill unfreeze.
-
#wind_attack? ⇒ Boolean
Is the skill a wind attack ?.
Methods included from Hooks
#exec_hooks, #force_return, included, remove, remove_without_name
Constructor Details
#initialize(db_symbol, pp, ppmax, scene) ⇒ Move
Create a new move
45 46 |
# File 'docs/5_Battle_10_Move.rb', line 45 def initialize(db_symbol, pp, ppmax, scene) end |
Instance Attribute Details
#consecutive_use_count ⇒ Integer
Number of time the move was used consecutively
21 22 23 |
# File 'docs/5_Battle_10_Move.rb', line 21 def consecutive_use_count @consecutive_use_count end |
#damage_dealt ⇒ Integer
Number of damage dealt last time the move was used (to be used with move history)
30 31 32 |
# File 'docs/5_Battle_10_Move.rb', line 30 def damage_dealt @damage_dealt end |
#effectiveness (readonly)
Get the effectiveness
285 286 287 |
# File 'docs/5_Battle_10_Move.rb', line 285 def effectiveness @effectiveness end |
#forced_next_move_decrease_pp ⇒ Boolean
Tell if forced next move decreases PP
646 647 648 |
# File 'docs/5_Battle_10_Move.rb', line 646 def forced_next_move_decrease_pp @forced_next_move_decrease_pp end |
#id ⇒ Integer (readonly)
ID of the move in the database
9 10 11 |
# File 'docs/5_Battle_10_Move.rb', line 9 def id @id end |
#logic ⇒ Battle::Logic (readonly)
23 24 25 |
# File 'docs/5_Battle_10_Move.rb', line 23 def logic @logic end |
#original ⇒ Battle::Move
27 28 29 |
# File 'docs/5_Battle_10_Move.rb', line 27 def original @original end |
#original_target ⇒ Array<PFM::PokemonBattler>
The original target of the move (to be used with Magic Bounce/Coat)
33 34 35 |
# File 'docs/5_Battle_10_Move.rb', line 33 def original_target @original_target end |
#pp ⇒ Integer
Number of pp the move currently has
12 13 14 |
# File 'docs/5_Battle_10_Move.rb', line 12 def pp @pp end |
#ppmax ⇒ Integer (readonly)
Maximum number of ppg the move currently has
15 16 17 |
# File 'docs/5_Battle_10_Move.rb', line 15 def ppmax @ppmax end |
#scene ⇒ Battle::Scene (readonly)
25 26 27 |
# File 'docs/5_Battle_10_Move.rb', line 25 def scene @scene end |
#thrown_item_effect ⇒ Battle::Effects::Item? (readonly)
Get the item effect of the thrown item (to be used with Fling)
39 40 41 |
# File 'docs/5_Battle_10_Move.rb', line 39 def thrown_item_effect @thrown_item_effect end |
#used ⇒ Boolean
if the move has been used
18 19 20 |
# File 'docs/5_Battle_10_Move.rb', line 18 def used @used end |
#user ⇒ PFM::PokemonBattler? (readonly)
Get the user of the move
36 37 38 |
# File 'docs/5_Battle_10_Move.rb', line 36 def user @user end |
Class Method Details
.[](symbol) ⇒ Class<Battle::Move>
Retrieve a registered move
290 291 |
# File 'docs/5_Battle_10_Move.rb', line 290 def [](symbol) end |
.register(symbol, klass)
Register a move
295 296 |
# File 'docs/5_Battle_10_Move.rb', line 295 def register(symbol, klass) end |
.register_move_disabled_check_hook(reason) {|user, move| ... }
Function that registers a move_disabled_check hook
894 895 |
# File 'docs/5_Battle_10_Move.rb', line 894 def register_move_disabled_check_hook(reason) end |
.register_move_prevention_target_hook(reason) {|user, target, move| ... }
Function that registers a move_prevention_target hook
902 903 |
# File 'docs/5_Battle_10_Move.rb', line 902 def register_move_prevention_target_hook(reason) end |
.register_move_prevention_user_hook(reason) {|user, targets, move| ... }
Function that registers a move_prevention_user hook
887 888 |
# File 'docs/5_Battle_10_Move.rb', line 887 def register_move_prevention_user_hook(reason) end |
.register_move_type_change_hook(reason) {|user, target, move, type| ... }
Function that registers a move_type_change hook
540 541 |
# File 'docs/5_Battle_10_Move.rb', line 540 def register_move_type_change_hook(reason) end |
.register_single_type_multiplier_overwrite_hook(reason) {|target, target_type, type, move| ... }
Function that registers a single_type_multiplier_overwrite hook
549 550 |
# File 'docs/5_Battle_10_Move.rb', line 549 def register_single_type_multiplier_overwrite_hook(reason) end |
Instance Method Details
#accuracy ⇒ Integer
Return the current accuracy of the move
90 91 |
# File 'docs/5_Battle_10_Move.rb', line 90 def accuracy end |
#accuracy_mod(user) ⇒ Float
Return the accuracy modifier of the user
608 609 |
# File 'docs/5_Battle_10_Move.rb', line 608 def accuracy_mod(user) end |
#accuracy_text ⇒ String
Return the accuracy text of the skill (for the UI)
94 95 |
# File 'docs/5_Battle_10_Move.rb', line 94 def accuracy_text end |
#atk_class ⇒ Integer
Return the class of the skill (used by the UI)
202 203 |
# File 'docs/5_Battle_10_Move.rb', line 202 def atk_class end |
#authentic? ⇒ Boolean
Tell if the move is a move that can bypass Substitute
254 255 |
# File 'docs/5_Battle_10_Move.rb', line 254 def authentic? end |
#ballistics? ⇒ Boolean
Tell if the move is a ballistic move
226 227 |
# File 'docs/5_Battle_10_Move.rb', line 226 def ballistics? end |
#battle_stage_mod ⇒ Array<Studio::Move::BattleStageMod>
Return the stat stage modifier the skill can apply
126 127 |
# File 'docs/5_Battle_10_Move.rb', line 126 def battle_stage_mod end |
#battler_targets(pokemon, logic) ⇒ Array<PFM::PokemonBattler>
use one_target? to select the target inside the possible result
List the targets of this move
641 642 |
# File 'docs/5_Battle_10_Move.rb', line 641 def battler_targets(pokemon, logic) end |
#be_method ⇒ Symbol Also known as: symbol
Return the battle engine method of the move
68 69 |
# File 'docs/5_Battle_10_Move.rb', line 68 def be_method end |
#bite? ⇒ Boolean
Tell if the move is biting move
230 231 |
# File 'docs/5_Battle_10_Move.rb', line 230 def bite? end |
#blocable? ⇒ Boolean
Is the skill blocable by Protect and skill like that ?
142 143 |
# File 'docs/5_Battle_10_Move.rb', line 142 def blocable? end |
#blocked_by?(target, symbol) ⇒ Boolean
Detect if the move is protected by another move on target
878 879 |
# File 'docs/5_Battle_10_Move.rb', line 878 def blocked_by?(target, symbol) end |
#bypass_chance_of_hit?(user, target) ⇒ Boolean
Check if the move bypass chance of hit and cannot fail
603 604 |
# File 'docs/5_Battle_10_Move.rb', line 603 def bypass_chance_of_hit?(user, target) end |
#calc_stab(user, types) ⇒ Numeric
STAB calculation
509 510 |
# File 'docs/5_Battle_10_Move.rb', line 509 def calc_stab(user, types) end |
#chance_of_hit(user, target) ⇒ Float
Return the chance of hit of the move
597 598 |
# File 'docs/5_Battle_10_Move.rb', line 597 def chance_of_hit(user, target) end |
#check_specific_procedure(user, targets) ⇒ Symbol?
Check if an Effects imposes a specific proceed_internal
828 829 |
# File 'docs/5_Battle_10_Move.rb', line 828 def check_specific_procedure(user, targets) end |
#clone
Clone the move and give a reference to the original one
53 54 |
# File 'docs/5_Battle_10_Move.rb', line 53 def clone end |
#critical_hit? ⇒ Boolean
Was the move a critical hit
214 215 |
# File 'docs/5_Battle_10_Move.rb', line 214 def critical_hit? end |
#critical_rate ⇒ Integer
Return the critical rate index of the skill
118 119 |
# File 'docs/5_Battle_10_Move.rb', line 118 def critical_rate end |
#damages(user, target) ⇒ Integer
: I used the 4th Gen formula : www.smogon.com/dp/articles/damage_formula
The formula is the following: (((((((Level * 2 / 5) + 2) * BasePower * [Sp]Atk / 50) / [Sp]Def) * Mod1) + 2) *
CH * Mod2 * R / 100) * STAB * Type1 * Type2 * Mod3)
Method calculating the damages done by the actual move
308 309 |
# File 'docs/5_Battle_10_Move.rb', line 308 def damages(user, target) end |
#dance? ⇒ Boolean
Tell if the move is a dance move
234 235 |
# File 'docs/5_Battle_10_Move.rb', line 234 def dance? end |
#data ⇒ Studio::Move
Return the data of the skill
57 58 |
# File 'docs/5_Battle_10_Move.rb', line 57 def data end |
#db_symbol ⇒ Symbol
Return the symbol of the move in the database
206 207 |
# File 'docs/5_Battle_10_Move.rb', line 206 def db_symbol end |
#deal_effect_sheer_force(user, actual_targets)
Function that deals the effect to the pokemon
843 844 |
# File 'docs/5_Battle_10_Move.rb', line 843 def deal_effect_sheer_force(user, actual_targets) end |
#definitive_types(user, target) ⇒ Array<Integer>
Get the types of the move with 1st type being affected by effects
515 516 |
# File 'docs/5_Battle_10_Move.rb', line 515 def definitive_types(user, target) end |
#description ⇒ String
Return the skill description
64 65 |
# File 'docs/5_Battle_10_Move.rb', line 64 def description end |
#direct? ⇒ Boolean
Is the skill direct ?
130 131 |
# File 'docs/5_Battle_10_Move.rb', line 130 def direct? end |
#disable_reason(user) ⇒ #call
Get the reason why the move is disabled
866 867 |
# File 'docs/5_Battle_10_Move.rb', line 866 def disable_reason(user) end |
#disabled?(user) ⇒ Boolean
Function that tells if the move is disabled
861 862 |
# File 'docs/5_Battle_10_Move.rb', line 861 def disabled?(user) end |
#drain_factor ⇒ Integer
Returns the drain factor
154 155 |
# File 'docs/5_Battle_10_Move.rb', line 154 def drain_factor end |
#effect_chance ⇒ Integer
Return the chance of effect of the skill
106 107 |
# File 'docs/5_Battle_10_Move.rb', line 106 def effect_chance end |
#efficent_message(effectiveness, target)
Show the effectiveness message
650 651 |
# File 'docs/5_Battle_10_Move.rb', line 650 def (effectiveness, target) end |
#evasion_mod(target) ⇒ Float
Return the evasion modifier of the target
613 614 |
# File 'docs/5_Battle_10_Move.rb', line 613 def evasion_mod(target) end |
#force_switch? ⇒ Boolean
Tell if the move is a move that forces target switch
270 271 |
# File 'docs/5_Battle_10_Move.rb', line 270 def force_switch? end |
#gravity_affected? ⇒ Boolean
Is the skill affected by gravity
122 123 |
# File 'docs/5_Battle_10_Move.rb', line 122 def gravity_affected? end |
#heal? ⇒ Boolean
Tell if the move is a heal move
242 243 |
# File 'docs/5_Battle_10_Move.rb', line 242 def heal? end |
#magic_coat_affected? ⇒ Boolean
Is the skill affected by magic coat ?
186 187 |
# File 'docs/5_Battle_10_Move.rb', line 186 def magic_coat_affected? end |
#mental? ⇒ Boolean
Tell if the move is a mental move
134 135 |
# File 'docs/5_Battle_10_Move.rb', line 134 def mental? end |
#mirror_move_affected? ⇒ Boolean
Is the skill affected by Mirror Move
138 139 |
# File 'docs/5_Battle_10_Move.rb', line 138 def mirror_move_affected? end |
#move_blocked_by_target?(user, target) ⇒ Boolean
Thing that prevents the move from being used should be defined by :move_prevention_target Hook.
Function that tests if the targets blocks the move
873 874 |
# File 'docs/5_Battle_10_Move.rb', line 873 def move_blocked_by_target?(user, target) end |
#move_usable_by_user(user, targets) ⇒ Boolean
Thing that prevents the move from being used should be defined by :move_prevention_user Hook
Function that tests if the user is able to use the move
856 857 |
# File 'docs/5_Battle_10_Move.rb', line 856 def move_usable_by_user(user, targets) end |
#multi_hit? ⇒ Boolean
Tells if the move hits multiple times
278 279 |
# File 'docs/5_Battle_10_Move.rb', line 278 def multi_hit? end |
#multi_turn? ⇒ Boolean
Tell if the move will take two or more turns
282 283 |
# File 'docs/5_Battle_10_Move.rb', line 282 def multi_turn? end |
#name
Return the name of the skill
60 61 |
# File 'docs/5_Battle_10_Move.rb', line 60 def name end |
#no_choice_skill? ⇒ Boolean Also known as: is_no_choice_skill?
Does the skill doesn’t show a target choice
632 633 |
# File 'docs/5_Battle_10_Move.rb', line 632 def no_choice_skill? end |
#not_very_effective? ⇒ Boolean
Was the move not very effective ?
222 223 |
# File 'docs/5_Battle_10_Move.rb', line 222 def not_very_effective? end |
#ohko? ⇒ Boolean
Tell if the move is an OHKO move
262 263 |
# File 'docs/5_Battle_10_Move.rb', line 262 def ohko? end |
#one_target? ⇒ Boolean Also known as: is_one_target?
Does the skill aim only one Pokemon
622 623 |
# File 'docs/5_Battle_10_Move.rb', line 622 def one_target? end |
#one_target_from_zone_attack(user) ⇒ Boolean
Check if an attack that targets multiple people is targeting only one
628 629 |
# File 'docs/5_Battle_10_Move.rb', line 628 def one_target_from_zone_attack(user) end |
#physical? ⇒ Boolean
Is the skill physical ?
190 191 |
# File 'docs/5_Battle_10_Move.rb', line 190 def physical? end |
#powder? ⇒ Boolean
Tell if the move is a powder move
250 251 |
# File 'docs/5_Battle_10_Move.rb', line 250 def powder? end |
#power ⇒ Integer Also known as: base_power
Return the actual base power of the move
77 78 |
# File 'docs/5_Battle_10_Move.rb', line 77 def power end |
#power_text ⇒ String
Return the text of the power of the skill (for the UI)
82 83 |
# File 'docs/5_Battle_10_Move.rb', line 82 def power_text end |
#pp_text ⇒ String
Return the text of the PP of the skill
73 74 |
# File 'docs/5_Battle_10_Move.rb', line 73 def pp_text end |
#pre_attack? ⇒ Boolean
Is the move doing something before any other moves ?
274 275 |
# File 'docs/5_Battle_10_Move.rb', line 274 def pre_attack? end |
#priority(user = nil) ⇒ Integer
Return the priority of the skill
99 100 |
# File 'docs/5_Battle_10_Move.rb', line 99 def priority(user = nil) end |
#proceed(user, target_bank, target_position)
Function starting the move procedure
660 661 |
# File 'docs/5_Battle_10_Move.rb', line 660 def proceed(user, target_bank, target_position) end |
#proceed_internal_dancer(user, targets)
Internal procedure of the move
848 849 |
# File 'docs/5_Battle_10_Move.rb', line 848 def proceed_internal_dancer(user, targets) end |
#proceed_internal_parental_bond(user, targets)
Internal procedure of the move for Parental Bond Ability
833 834 |
# File 'docs/5_Battle_10_Move.rb', line 833 def proceed_internal_parental_bond(user, targets) end |
#proceed_internal_sheer_force(user, targets)
Internal procedure of the move for Sheer Force Ability
838 839 |
# File 'docs/5_Battle_10_Move.rb', line 838 def proceed_internal_sheer_force(user, targets) end |
#proceed_pre_attack(user)
Proceed the procedure before any other attack.
664 665 |
# File 'docs/5_Battle_10_Move.rb', line 664 def proceed_pre_attack(user) end |
#pulse? ⇒ Boolean
Tell if the move is a pulse move
238 239 |
# File 'docs/5_Battle_10_Move.rb', line 238 def pulse? end |
#punching? ⇒ Boolean
Is the skill a punching move ?
158 159 |
# File 'docs/5_Battle_10_Move.rb', line 158 def punching? end |
#real_base_power(user, target) ⇒ Integer
Get the real base power of the move (taking in account all parameter)
314 315 |
# File 'docs/5_Battle_10_Move.rb', line 314 def real_base_power(user, target) end |
#recharge? ⇒ Boolean
Tell if the move is a move is a recharge move
258 259 |
# File 'docs/5_Battle_10_Move.rb', line 258 def recharge? end |
#recoil? ⇒ Boolean
Does the skill has recoil ?
146 147 |
# File 'docs/5_Battle_10_Move.rb', line 146 def recoil? end |
#recoil_factor ⇒ Integer
Returns the recoil factor
150 151 |
# File 'docs/5_Battle_10_Move.rb', line 150 def recoil_factor end |
#relative_priority
Move priority
102 103 |
# File 'docs/5_Battle_10_Move.rb', line 102 def relative_priority end |
#self_user_switch? ⇒ Boolean
Tell if the move is a move that switch the user if that hit
266 267 |
# File 'docs/5_Battle_10_Move.rb', line 266 def self_user_switch? end |
#show_usage_failure(user)
Show the usage failure when move is not usable by user
654 655 |
# File 'docs/5_Battle_10_Move.rb', line 654 def show_usage_failure(user) end |
#slicing_attack? ⇒ Boolean
Is the skill a slicing attack ?
166 167 |
# File 'docs/5_Battle_10_Move.rb', line 166 def slicing_attack? end |
#snatchable? ⇒ Boolean
Is the skill snatchable ?
182 183 |
# File 'docs/5_Battle_10_Move.rb', line 182 def snatchable? end |
#sound_attack? ⇒ Boolean
Is the skill a sound attack ?
162 163 |
# File 'docs/5_Battle_10_Move.rb', line 162 def sound_attack? end |
#special? ⇒ Boolean
Is the skill special ?
194 195 |
# File 'docs/5_Battle_10_Move.rb', line 194 def special? end |
#status? ⇒ Boolean
Is the skill status ?
198 199 |
# File 'docs/5_Battle_10_Move.rb', line 198 def status? end |
#status_effects ⇒ Array<Studio::Move::MoveStatus>
Get all the status effect of a move
110 111 |
# File 'docs/5_Battle_10_Move.rb', line 110 def status_effects end |
#super_effective? ⇒ Boolean
Was the move super effective ?
218 219 |
# File 'docs/5_Battle_10_Move.rb', line 218 def super_effective? end |
#target ⇒ Symbol
Return the target symbol the skill can aim
114 115 |
# File 'docs/5_Battle_10_Move.rb', line 114 def target end |
#to_s ⇒ String Also known as: inspect
Format move for logging purpose
49 50 |
# File 'docs/5_Battle_10_Move.rb', line 49 def to_s end |
#trigger_king_rock? ⇒ Boolean
Does the skill trigger the king rock
178 179 |
# File 'docs/5_Battle_10_Move.rb', line 178 def trigger_king_rock? end |
#two_turn? ⇒ Boolean
Tell if the move is a two turn move
246 247 |
# File 'docs/5_Battle_10_Move.rb', line 246 def two_turn? end |
#type ⇒ Integer
Return the current type of the move
86 87 |
# File 'docs/5_Battle_10_Move.rb', line 86 def type end |
#type?(type_id) ⇒ Boolean
Is the skill a specific type ?
404 405 |
# File 'docs/5_Battle_10_Move.rb', line 404 def type?(type_id) end |
#type_dark? ⇒ Boolean Also known as: type_tenebre?
Is the skill type dark ?
490 491 |
# File 'docs/5_Battle_10_Move.rb', line 490 def type_dark? end |
#type_dragon? ⇒ Boolean
Is the skill type dragon ?
481 482 |
# File 'docs/5_Battle_10_Move.rb', line 481 def type_dragon? end |
#type_electric? ⇒ Boolean Also known as: type_electrique?
Is the skill type electric ?
426 427 |
# File 'docs/5_Battle_10_Move.rb', line 426 def type_electric? end |
#type_fairy? ⇒ Boolean Also known as: type_fee?
Is the skill type fairy ?
495 496 |
# File 'docs/5_Battle_10_Move.rb', line 495 def type_fairy? end |
#type_fighting? ⇒ Boolean Also known as: type_combat?
Is the skill type fighting ?
441 442 |
# File 'docs/5_Battle_10_Move.rb', line 441 def type_fighting? end |
#type_fire? ⇒ Boolean Also known as: type_feu?
Is the skill type fire ?
416 417 |
# File 'docs/5_Battle_10_Move.rb', line 416 def type_fire? end |
#type_flying? ⇒ Boolean Also known as: type_vol?, type_fly?
Is the skill type fly ?
455 456 |
# File 'docs/5_Battle_10_Move.rb', line 455 def end |
#type_ghost? ⇒ Boolean Also known as: type_spectre?
Is the skill type ghost ?
476 477 |
# File 'docs/5_Battle_10_Move.rb', line 476 def type_ghost? end |
#type_grass? ⇒ Boolean Also known as: type_plante?
Is the skill type grass ?
431 432 |
# File 'docs/5_Battle_10_Move.rb', line 431 def type_grass? end |
#type_ground? ⇒ Boolean Also known as: type_sol?
Is the skill type ground ?
450 451 |
# File 'docs/5_Battle_10_Move.rb', line 450 def type_ground? end |
#type_ice? ⇒ Boolean Also known as: type_glace?
Is the skill type ice ?
436 437 |
# File 'docs/5_Battle_10_Move.rb', line 436 def type_ice? end |
#type_insect? ⇒ Boolean Also known as: type_bug?
Is the skill type insect/bug ?
466 467 |
# File 'docs/5_Battle_10_Move.rb', line 466 def type_insect? end |
#type_modifier(user, target) ⇒ Float
Function that calculate the type modifier (for specific uses)
503 504 |
# File 'docs/5_Battle_10_Move.rb', line 503 def type_modifier(user, target) end |
#type_normal? ⇒ Boolean
Is the skill type normal ?
412 413 |
# File 'docs/5_Battle_10_Move.rb', line 412 def type_normal? end |
#type_poison? ⇒ Boolean
Is the skill type poison ?
446 447 |
# File 'docs/5_Battle_10_Move.rb', line 446 def type_poison? end |
#type_psychic? ⇒ Boolean Also known as: type_psy?
Is the skill type psy ?
461 462 |
# File 'docs/5_Battle_10_Move.rb', line 461 def type_psychic? end |
#type_rock? ⇒ Boolean Also known as: type_roche?
Is the skill type rock ?
471 472 |
# File 'docs/5_Battle_10_Move.rb', line 471 def type_rock? end |
#type_steel? ⇒ Boolean Also known as: type_acier?
Is the skill type steel ?
485 486 |
# File 'docs/5_Battle_10_Move.rb', line 485 def type_steel? end |
#type_water? ⇒ Boolean Also known as: type_eau?
Is the skill type water ?
421 422 |
# File 'docs/5_Battle_10_Move.rb', line 421 def type_water? end |
#typeless? ⇒ Boolean
Is the skill typeless ?
408 409 |
# File 'docs/5_Battle_10_Move.rb', line 408 def typeless? end |
#unfreeze? ⇒ Boolean
Does the skill unfreeze
170 171 |
# File 'docs/5_Battle_10_Move.rb', line 170 def unfreeze? end |
#wind_attack? ⇒ Boolean
Is the skill a wind attack ?
174 175 |
# File 'docs/5_Battle_10_Move.rb', line 174 def wind_attack? end |