Class: Battle::AI::MoveHeuristicBase
- Defined in:
- docs/5_Battle_30_AI_1_MoveHeuristic.rb
Overview
Class responsive of handling the heuristics of moves
Defined Under Namespace
Classes: AquaRing, Belch, BurnUp, CantSwitch, CuringMove, Disable, DreamEater, Embargo, Encore, Endeavor, EndeavorSimple, FakeOut, FocusEnergy, Foresight, HealingMoves, Ingrain, LastResort, LeechSeed, LuckyChant, MagnetRise, MiracleEye, Mist, MultiHit, Nightmare, Poltergeist, PopulationBomb, ReflectMoves, Rest, Safeguard, SelfEffectBase, SleepTalk, Snore, Spikes, StealthRock, StickyWeb, Tailwind, Taunt, TerrainMove, TerrainMoveSeeItem, ThreeHit, Torment, ToxicSpikes, Transform, TripleKick, TwoHit, UnstackableBankEffectBase, UnstackableEffectBase, WeatherMove, WeatherMoveSeeItem, Yawn
Class Method Summary collapse
-
.new(db_symbol, level) ⇒ MoveHeuristicBase
Get a MoveHeuristic by db_symbol and level.
-
.register(db_symbol, klass, min_level = 0)
Register a new move heuristic.
Instance Method Summary collapse
-
#compute(move, user, target, ai) ⇒ Float
Compute the heuristic.
-
#ignore_effectiveness? ⇒ Boolean
Is this heuristic ignoring effectiveness.
-
#ignore_power? ⇒ Boolean
Is this heuristic ignoring power.
-
#initialize(ignore_effectiveness = false, ignore_power = false, overwrite_move_kind_flag = false) ⇒ MoveHeuristicBase
constructor
Create a new MoveHeusristicBase.
-
#low_odd(ai) ⇒ Float
Generate a low odd float.
-
#overwrite_move_kind_flag? ⇒ Boolean
Is this heuristic ignoring power.
Constructor Details
#initialize(ignore_effectiveness = false, ignore_power = false, overwrite_move_kind_flag = false) ⇒ MoveHeuristicBase
Create a new MoveHeusristicBase
10 11 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 10 def initialize(ignore_effectiveness = false, ignore_power = false, overwrite_move_kind_flag = false) end |
Class Method Details
.new(db_symbol, level) ⇒ MoveHeuristicBase
Get a MoveHeuristic by db_symbol and level
49 50 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 49 def new(db_symbol, level) end |
.register(db_symbol, klass, min_level = 0)
If there's several min_level, the highest condition matching with current AI level is choosen.
Register a new move heuristic
43 44 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 43 def register(db_symbol, klass, min_level = 0) end |
Instance Method Details
#compute(move, user, target, ai) ⇒ Float
Compute the heuristic
30 31 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 30 def compute(move, user, target, ai) end |
#ignore_effectiveness? ⇒ Boolean
Is this heuristic ignoring effectiveness
14 15 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 14 def ignore_effectiveness? end |
#ignore_power? ⇒ Boolean
Is this heuristic ignoring power
18 19 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 18 def ignore_power? end |
#low_odd(ai) ⇒ Float
Generate a low odd float
35 36 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 35 def low_odd(ai) end |
#overwrite_move_kind_flag? ⇒ Boolean
Is this heuristic ignoring power
22 23 |
# File 'docs/5_Battle_30_AI_1_MoveHeuristic.rb', line 22 def overwrite_move_kind_flag? end |