Code: |
---------- Erreur de script : Pokemon_Battle_Wild ---------- ----- Type FloatDomainError ----- Message NaN ----- Position dans Pokemon_Battle_Wild Ligne 505 ----- Backtrace Script : Pokemon_Battle_Wild | Ligne : 505 | Méthode : in `Integer' Script : Pokemon_Battle_Wild | Ligne : 505 | Méthode : in `qu_catch_pokemon' Script : Fonctions quêtes | Ligne : 47 | Méthode : in `catch_pokemon' Script : Pokemon_Battle_Wild | Ligne : 369 | Méthode : in `actor_item_use' Script : Pokemon_Battle_Core 1 | Ligne : 512 | Méthode : in `phase2' Script : Pokemon_Battle_Core 1 | Ligne : 416 | Méthode : in `update' Script : Pokemon_Battle_Core 1 | Ligne : 156 | Méthode : in `main' Script : Pokemon_Battle_Core 1 | Ligne : 153 | Méthode : in `loop' Script : Pokemon_Battle_Core 1 | Ligne : 160 | Méthode : in `main' Script : Main | Ligne : 49 |
Code: |
multiplier = @enemy.rareness * (ball_rate) maxhp = @enemy.maxhp_basis hp = @enemy.hp catch_rate = Integer((((maxhp * 3 - hp * 2)*multiplier).to_f/(maxhp*3).to_f)*status_multiplier) catch_value = Integer(1048560 / (Math.sqrt(Math.sqrt(16711680/catch_rate.to_f)))) list = [rand(65536), rand(65536), rand(65536), rand(65536)] j = 4 # nombre de fois que la balle oscille for i in list j -= i > catch_value ? 1 : 0 end |