[XP] Rain of Add-ons

Started by Xelias, November 26, 2009, 02:44:06 pm

Previous topic - Next topic

Xelias

November 26, 2009, 02:44:06 pm Last Edit: December 23, 2012, 01:35:13 am by KK20
Rain of Add-Ons
Authors: Xelias
Version: 1.00
Type: Add-on Collection Control Script
Key Term: Add-on Collection



Introduction

Basically, it is me messing up with some of Tons of Add-Ons scripts. Now, it just features status effect scripts, but more to come.


Features


  • Oil Status
  • Shell Status
  • Protect Status
  • Virus Status
  • MP Shield Status
  • Spikes Status



Screenshots

No screens. How can you screenshot a status effect ?  


Demo

No demo.


Script


Spoiler: ShowHide

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Rain of Add-ons by Xelias
# Version: 1.00
# Type: Add-on Collection Control Script
# Date v1.00b:   26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                                    
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#  
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# #  
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #  
# #  You are free:
# #  
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# #  
# #  Under the following conditions:
# #  
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# #  
# #  Noncommercial. You may not use this work for commercial purposes.
# #  
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# #  
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# #  
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# #  
# #  - Nothing in this license impairs or restricts the author's moral rights.
# #  
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

class Game_System
 
 alias init_rain_of_addons_later initialize
 def initialize
   init_rain_of_addons_later
   
   @OIL_STATUS            = false
   @SHELL_STATUS = false
   @PROTECT_STATUS = true
   @VIRUS_STATUS = false
   @MP_SHIELD_STATUS = false
   @SPIKES_STATUS = true
   
end  
   
 attr_accessor :OIL_STATUS
 attr_accessor :SHELL_STATUS
 attr_accessor :PROTECT_STATUS
 attr_accessor :VIRUS_STATUS
 attr_accessor :MP_SHIELD_STATUS
 attr_accessor :SPIKES_STATUS
 
end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Oil Status Effect by Xelias
# Version: 1.0b
# Type: Enhanced Status
# Date: 24.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Allows to create a status increasing damage taken by Fire Element.
#
#
# Configuration:
#
#   OIL_IDS       - the IDs of the Oil status effects
#   FIRE_ELEMENT_ID - the ID of the fire element
#   FIRE_MULTIPLIER : How much times Fire Attacks should be stronger
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

OIL_IDS = [19]
FIRE_ELEMENT_ID = 1
FIRE_MULTIPLIER = 3

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
 alias attack_effect_oil_later attack_effect
 def attack_effect(attacker)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = attack_effect_oil_later(attacker)
   oil_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
   return result
 end
 
 alias skill_effect_oil_later skill_effect
 def skill_effect(user, skill)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = skill_effect_oil_later(user, skill)
   oil_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
   return result
 end
 
 alias item_effect_oil_later item_effect
 def item_effect(item, battler = nil)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   if battler == nil
     result = item_effect_oil_later(item)
   else
     result = item_effect_oil_later(item, battler)
   end
   oil_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
   return result
 end
 
 def oil_effect(last_hp, last_sr, object)
   if $game_system.OIL_STATUS && OIL_IDS.any? {|i| @states.include?(i)}
     self.hp = last_hp
     self.hp = self.hp                                                                                                                                                  
     self.sr = last_sr if last_sr != nil
     if object.element_set.include?(FIRE_ELEMENT_ID)
       self.damage = (self.damage * FIRE_MULTIPLIER).to_i
     end
     self.hp -= self.damage
   end
 end
 
end
   
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Shell Status by Xelias
# Version: 1.00
# Type: Enhanced Status
# Date: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
# Thanks to this, you can create a "Shell Status" that halves all Magic Damage you take.
# You can put an animation on the character affected with  Shell just before the magic hits
# - Configuration  
#  
#   SHELL_IDS - include any IDs of Shell Statuses and separate them with
#                 commas (i.e. [52, 53, 54])
#   SHELL_ANIMATION_ID - Put the animation id. If you don't want any, make it 0.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

SHELL_IDS = [30]
SHELL_ANIMATION_ID = 64

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
 alias skill_effect_shell_skill_later skill_effect
 def skill_effect(user, skill)
   last_hp = self.hp
   last_sr = self.sr if $crls && self.is_a?(Game_Actor)
   result = skill_effect_shell_skill_later(user, skill)
   if $game_system.SHELL_STATUS  
       self.hp = last_hp
     self.hp = self.hp
     self.sr = last_sr if $crls && self.is_a?(Game_Actor)
     if  self.damage.is_a?(Numeric)
    if  skill.int_f > 0 &&  SHELL_IDS.any? {|i| @states.include?(i)}
      self.damage = (self.damage/2).to_i
     self.animation_id = SHELL_ANIMATION_ID
    end
       self.hp -= self.damage
     end
   end
   return result
 end
 
end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Protect Status by Xelias
# Version: 1.00
# Type: Enhanced Status
# Date: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
# Thanks to this, you can create a "Protect Status" that halves all Physical Damage you take.
# This includes both physical attacks and skills with an intelligence influence of 0.
# You can put an animation on the character affected with Protect just before the magic hits
# - Configuration  
#  
#   PROTECT_IDS - include any IDs of Protect Statuses and separate them with
#                 commas (i.e. [29])
#   PROTECT_ANIMATION_ID - Put the animation id. If you don't want any, make it 0.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

PROTECT_IDS = [28]
PROTECT_ANIMATION_ID = 65

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
 alias skill_effect_protect_skill_later skill_effect
 def skill_effect(user, skill)
   last_hp = self.hp
   last_sr = self.sr if $crls && self.is_a?(Game_Actor)
   result = skill_effect_protect_skill_later(user, skill)
   if $game_system.PROTECT_STATUS  
       self.hp = last_hp
     self.hp = self.hp
     self.sr = last_sr if $crls && self.is_a?(Game_Actor)
     if  self.damage.is_a?(Numeric)
    if  skill.int_f == 0 &&  PROTECT_IDS.any? {|i| @states.include?(i)}
      self.damage = (self.damage/2).to_i
     self.animation_id = PROTECT_ANIMATION_ID
    end
       self.hp -= self.damage
     end
   end
   return result
 end
 
 alias attack_effect_protect_later attack_effect
 def attack_effect(attacker)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = attack_effect_protect_later(attacker)
   protect_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
   return result
 end
 
   def protect_effect(last_hp, last_sr, object)
   if $game_system.PROTECT_STATUS && PROTECT_IDS.any? {|i| @states.include?(i)}
     self.hp = last_hp
     self.hp = self.hp                                                                                                                                                  
     self.sr = last_sr if last_sr != nil
      self.damage = (self.damage/2)
     self.animation_id = PROTECT_ANIMATION_ID
     self.hp -= self.damage
   end
 end
 
end


   
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Virus Status Effect by Xelias
# Version: 1.00
# Type: Game Experience Improvement
# Date: 26.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Allows to create a status preventing healing.
#
#
# Configuration:
#
#   VIRUS_IDS - the IDs of the Virus status effects
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

VIRUS_IDS = [14]

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 

 alias skill_effect_virus_later skill_effect
 def skill_effect(user, skill)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = skill_effect_virus_later(user, skill)
   virus_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
   return result
 end
 
 alias item_effect_virus_later item_effect
 def item_effect(item, battler = nil)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   if battler == nil
     result = item_effect_virus_later(item)
   else
     result = item_effect_virus_later(item, battler)
   end
   virus_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
   return result
 end
 
 def virus_effect(last_hp, last_sr, object)
   if $game_system.VIRUS_STATUS && VIRUS_IDS.any? {|i| @states.include?(i)}
     self.hp = last_hp
     self.hp = self.hp                                                                                                                                                  
     self.sr = last_sr if last_sr != nil
     if self.damage < 0
       self.damage = (self.damage*0).to_i
       end
     self.hp -= self.damage
   end
 end
 
end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# MP Shield Status Effect by Xelias
# Version: 1.00
# Type: Game Experience Improvement
# Date: 26.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# When under this status, you never lose HP. However, you lose SP instead. When
# your SP reach 0, this status becomes ineffective.
#
# Configuration:
#
#  MP_SHIELD_IDS - the IDs of the MP Shield status effects
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

MP_SHIELD_IDS = [14]
MP_SHIELD_ANIMATION_ID = 8


#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
  alias attack_effect_mpshield_later attack_effect
 def attack_effect(attacker)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = attack_effect_mpshield_later(attacker)
   mpshield_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
   return result
 end  
 
 alias skill_effect_mpshield_later skill_effect
 def skill_effect(user, skill)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = skill_effect_mpshield_later(user, skill)
   mpshield_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
   return result
 end
 
 alias item_effect_mpshield_later item_effect
 def item_effect(item, battler = nil)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   if battler == nil
     result = item_effect_mpshield_later(item)
   else
     result = item_effect_mpshield_later(item, battler)
   end
   mpshield_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
   return result
 end
 
 def mpshield_effect(last_hp, last_sr, object)
   if $game_system.MP_SHIELD_STATUS && MP_SHIELD_IDS.any? {|i| @states.include?(i)}
     self.hp = last_hp
     self.hp = self.hp                                                                                                                                                  
     self.sr = last_sr if last_sr != nil
     if self.sp > 0 && self.damage > 0
     self.animation_id = MP_SHIELD_ANIMATION_ID
     self.sp -= self.damage
   else
     self.hp -= self.damage
     end
   end
 end
 
end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Spike Status by Xelias
# Version: 1.00
# Type: Enhanced Status
# Date: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
#  This allows to create a Spike Status. It inflicts damage to your opponent every time
# he or she attacks or uses a special skill. You can also set a special animation to hit
# the opponent
# - Configuration  
#  
#   SPIKES_IDS - include any IDs of Spikes Statuses and separate them with
#                 commas (i.e. [29])
#   SPIKES_ANIMATION_ID - Put the animation id. If you don't want any, make it 0.
#   SPIKES_PROTECTION - Set to true if you want to lower the damage taken by the
#   damage inflected by the spikes. Set false if you don't.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

SPIKES_IDS = [29]
SPIKES_ANIMATION_ID =43
SPIKES_PROTECTION = false

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
 alias skill_effect_spikes_skill_later skill_effect
 def skill_effect(user, skill)
   last_hp = self.hp
   last_sr = self.sr if $crls && self.is_a?(Game_Actor)
   result = skill_effect_spikes_skill_later(user, skill)
   if $game_system.SPIKES_STATUS  
       self.hp = last_hp
     self.hp = self.hp
     self.sr = last_sr if $crls && self.is_a?(Game_Actor)
     if  self.damage.is_a?(Numeric)
    if  skill.int_f == 0 &&  SPIKES_IDS.any? {|i| @states.include?(i)}
         user.damage = ( ( [self.pdef - user.pdef / 2, 0].max )* (20 + self.str) / 20 ) /10
     user.hp -= user.damage
     user.animation_id = SPIKES_ANIMATION_ID
         if SPIKES_PROTECTION
       self.damage -= user.damage
       end
    end
       self.hp -= self.damage
     end
   end
   return result
 end
 
 alias attack_effect_spikes_later attack_effect
 def attack_effect(attacker)
   last_hp = self.hp
   last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
   result = attack_effect_spikes_later(attacker)
   spikes_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
   return result
 end
 
   def spikes_effect(last_hp, last_sr, object)
   if $game_system.SPIKES_STATUS && SPIKES_IDS.any? {|i| @states.include?(i)}
     self.hp = last_hp
     self.hp = self.hp                                                                                                                                                  
     self.sr = last_sr if last_sr != nil
         object.damage = ( ( [self.pdef - object.pdef / 2, 0].max )* (20 + self.str) / 20 ) /10
     object.hp -= object.damage
     object.animation_id = SPIKES_ANIMATION_ID
         if SPIKES_PROTECTION
       self.damage -= object.damage
       end
     self.hp -= self.damage
   end
 end
 
end





Instructions

Paste it above main.


Compatibility

As it works like Blizzard's tons, I'd say it is "90% compatible with SDK v1.x. 80% compatible with SDK v2.x." to quote Blizzard. Also should work in Blizz-ABS... May cause problem with exotic CBS


Credits and Thanks


  • Xelias, for modifying Blizzard's scripts
  • Blizzard, for making his marvelous Tons of Add-Ons  



Author's Notes


  • Will add more... when I feel like it.
  • Due to the small number of add-ons, the title doesn't fit... It was just a tribute/parody to Blizzard's Tons... Hehehe... Sorry, Blizz...


My sprites
Kuja Tales of the World style :

Aqua

:o
Looks awwweeessssoooommmmeeee!

Blizzard

I think you're kinda taking the wrong approach here.

Shell Status - Just make a normal status effect with double MDEF.
Protect Status - Just make a normal status effect with double PDEF.
Virus Status - Not a bad idea, but can be done through Elemental Status effects. *points to end of this post* Also, you forgot that Virus should have decreased max HP and that it doesn't allow to gain EXP (can both be done through the status database rather than scripting).
Spike Status - Basically a counter effect. I simply can't find the time to add one to Tons. xD

As for Oil Status, it's a good idea, but you should expand it. Better you make something like "Elemental Status Effects" that allow you to change the elemental alignment of a character if he has a specific status effect. i.e. Oil Status would simple be an Elemental Status that doubles fire effectiveness. That way you can also easily make armors with autostates that allow you to absorb elements.

MP Shield is a cool idea, though.

Besides the technical stuff, I'm flattered. xD

BTW, if make the Elemental Status Effect work, I can add it along with MP Shield to Tons.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Xelias

November 27, 2009, 12:12:21 am #3 Last Edit: November 27, 2009, 12:08:01 pm by Xelias
@Aqua : Thanks
@Blizzard :
QuoteProtect Status - Just make a normal status effect with double PDEF.


 atk = [attacker.atk - self.pdef / 2, 0].max
     self.damage = atk * (20 + attacker.str) / 20


If I apply this formula to an attack of 100, a strength of 100 and a PDEF of 50...

atk = (100 - 25) = 75
self.damage = 75 + (120/20) = 81

And is the PDef is doubled, it should halve damage taken ? So it would be 40,5... Let's just test...

atk = (100 - 50) = 50
self.damage = 50 + (120/20) = 56

Not exactly the half, and that's why I use it. And it's the same for MDEF and Shell. Plus you can put animations.

And Virus has more than one effect. I was looking at FF Wiki for scripting ideas...

For "Elemental Status", there is already a XRXS script that does all of that. And you can attach it to weapons, states and armors ! So it's useless for me to make one. And I just can't make one...



My sprites
Kuja Tales of the World style :

Blizzard

Right, there was no way to halve the damage besides this. >.< In any case, if you make a configuration to be able to set multiple status effects and up how much damage each status effect reduces, I can add them to Tons anyway. BTW, you shouldn't use Intelligence to check if a skill is a magic skill, but rather check if pdef_f and mdef_f are greater than 0.

Even if XRXS made a script doesn't mean it's compatible with a wide range of scripts. I bet it wouldn't work with Blizz-ABS. It still has a point to be made.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fugibo

Quote from: Xelias on November 27, 2009, 12:12:21 am
QuoteProtect Status - Just make a normal status effect with double PDEF.


 atk = [attacker.atk - self.pdef / 2, 0].max
     self.damage = atk * (20 + attacker.str) / 20


If I apply this formula to an attack of 100, a strength of 100 and a PDEF of 50...

atk = (100 - 25) = 75
self.damage = 75 + (120/20) = 81

And is the PDef is doubled, it should halve damage taken ? So it would be 40,5... Let's just test...

atk = (100 - 50) = 50
self.damage = 50 + (120/20) = 56

Not exactly the half, and that's why I use it. And it's the same for MDEF and Shell. Plus you can put animations.

And Virus has more than one effect. I was looking at FF Wiki for scripting ideas...

For "Elemental Status", there is already a XRXS script that does all of that. And you can attach it to weapons, states and armors ! So it's useless for me to make one. And I just can't make one...




You're not plugging those numbers in to the right formula, you're supposed to multiply atk, not add. So yes, it is halved if you use the formula you showed in the code box.

Blizzard

You're right, he did mess up with the calculation. But I remember how in CP once an enemy did normal damage (2000-3000) when PDEF was at 100% and very little (under 100) when it was 200%. It's atk - pdef, not atk / pdef after all.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Xelias

@Longfellow : Shame on me, I messed up, but it doesn't change...

75*6 is equal to 450
50*6 is equal to 300
And 300 is the 2/3 of 450, not the half.


My sprites
Kuja Tales of the World style :

winkio

Quote from: Xelias on November 27, 2009, 12:02:04 pm
@Longfellow : Shame on me, I messed up, but it doesn't change...

75*6 is equal to 450
50*6 is equal to 300
And 300 is the 2/3 of 450, not the half.


that's because 50 is 2/3 of 75, not half

Xelias

That's quite logical :haha: ...But I don't see what's the point.


My sprites
Kuja Tales of the World style :

Shining Riku

Lol, I tried editing Blizz's Zombie state to make elemental absorption, and it actually works too but normal healing moves deal damage afterwards XD

I'd be glad to show it to others, but it kinda defeats the purpose of it HELPING people! XD I mean, it'd be handy when somebody goes into a cave full of fire-using monsters with a suit of fire absorbing armor....but that'd be the only time. :p

I'm KINDA getting the hang of scripting, but only with stuff that I KNOW what it's supposed to do. at best i'm just a script editor as well

Aqua

Um... elemental resistances already have absorption... o.o

Grade F

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

Ah right...
Just remembered that states only remove other states and add some elemental defense...

Thought it could change elemental resistance, too.
My bad XD

Agckuu Coceg

Xelias, I became interested in this script as a base for addons. Did you write me a couple of add-ons to your script?
I'm not retarded, but I'm busy. Sorry for patience.


Starrodkirby86

Quote from: Agckuu Coceg on March 01, 2010, 01:14:16 am
Xelias, I became interested in this script as a base for addons. Did you write me a couple of add-ons to your script?

It doesn't look like Xelias has been coming here in recent days. >: He was last active during December.

...Or prove me wrong, Xelias! Come to our bosoms now!

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Agckuu Coceg

 :^_^':
Nothing, I can always wait. If he suddenly appear, I'll ask him.
I'm not retarded, but I'm busy. Sorry for patience.