Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spell Effects
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given.


Spell Effect No1
Name: Desparation
Special Inputs: None
Description: The lower the battlers hp the more damage that will be inflicted on the target

Create an element called desparation or whatever remember the Id
Script Editor class Game_Battler 3 skill_effect find

Code:
if skill.power != 0 and skill.atk_f > 0
          remove_states_shock
          effective = true
        end



remember this spot
right after the end statement add

Code:
if skill.element_set.include?(ELEMENT ID)
          @damage_hp = 10 * user.maxhp / user.hp + self.damage
          #change the formula if you want but the maxhp/hp is the most
          #important part
        end


Make sure you have this somewhere (preferably after this code) in skill effect

Code:
if @damage_hp != 0
          self.damage = @damage_hp
          last_hp = self.hp
          self.hp -= @damage_hp
          @hp_damaging = true
        end



Since making these are much easier (and waaaaaay beyond my scripting level ) I can do many at a time

Name: Chance Damage
Special Input:
Variance is the multiplier
Effect Rating is the maximum
Attack power is the minimum
Description: Damage equals a random number from attack power to effect rating then multiplied by variance

Create an element remember Id

goto script editor goto the spot right after you put desparation and put this

Code:
if skill.element_set.include?(ELEMENT ID)
          @damage_hp = skill.variance * (rand(skill.power - skill.atk_f + 1) + skill.atk_f - 1)
        end



And you're done



Name: Better Direct Hp Damaging Skill (Demi, Quarter)
Special Input: Effect Rating = % of hp left after the effect
Description: Target loses a percentage of hp

Create an element called direct hp damage
Optional create an element call direct max hp damage

Game_battler 3 same place

Code:
if skill.element_set.include?(DIRECT HP ID)
          @damage_hp = self.hp * (100 - skill.power) / 100
        end
OPTIONAL
Code:
if skill.element_set.include?(DIRECT MAX HP ID)
          @damage_hp = self.maxhp * (100 - skill.power) / 100
        end




Now for more crazier skill effects

Name: Pain Split
Special Input: None
Description: Have you ever seen this move in Pokemon well It does the same thing only it does sp also (Averages hp with the target)

Yes create an element

same place in Game_Battler 3

Code:
if skill.element_set.include?(28)
          savehp = 0
          savesp = 0
          savehp += self.hp + user.hp
          savesp += self.sp + user.sp
          savehp /= 2
          savesp /= 2
          user.hp = savehp
          user.sp = savesp
          self.hp = savehp
          self.sp = savesp
          self.damage = "Split"
        end



When the target is all enemies or all actors please note that it does it with one actor and then moves to the next actor averages with that and so on



Last one for now

Name: Swap
Special Input: None
Description: Swaps hp/sp with the target

An element shall be created with the honor of having the name Swap

you should know where this code goes

Code:
if skill.element_set.include?(27)
          savehp = 0
          savesp = 0
          savehp += self.hp
          savesp += self.sp
          self.hp = user.hp
          self.sp = user.sp
          user.hp = savehp
          user.sp = savesp
          self.damage = "Swapped"
        end


note when target is all enemies or all allies It swaps with target 1. target 1 now has the users hp/sp target 2 gets target 1's stuff and the user has target 2 hp/mp
The Trickster License V1.0
}




Users browsing this thread: