Change Pre-emptive and Surprise

● ARCHIVED · READ-ONLY
Started by Milena 6 posts View original ↗
  1. I am in need of a script that:

    1. Change the probability to get preemptive and surprise into true or false, or using true or false only...instead of getting the probability into the troop agility. So if I call preemptive = true, then it would be a preemptive battle and so on.
    Thank you very much.
  2. Hum I can try my hand on this~
  3. Thanks, I'll be waiting for it :D
  4. module BattleManager   #change via a script call : BattleManager.prep or surp = true or false   class << self    attr_accessor :prep    attr_accessor :surp  end def self.on_encounter  @preemptive = ( rate_preemptive)    @surprise = ( rate_surprise && !preemptive )   enddef self.rate_preemptive  if @prep == true    @preemptive = true  else   @preemptive = false    endenddef self.rate_surprise  if @surp == true && @prep == !true    @surprise = true  else    @surprise = false  endendendendHere finish I don't know if it work I don't tested it and I don't know what is the surprise and premptive effect so if it anny kind of bug say it xD
  5. Looks good and working, however, when I script call it and start a battle, it just shows a regular battle without being a preemptive or a surprise.
  6. I play with the script and for the moment I am in the unability to find how to settle your problem... I will try to find a way to fix this...sorry for not be able to help you..