Author Topic: [XP] Spike Damage  (Read 6928 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
[XP] Spike Damage
« on: March 21, 2010, 04:01:15 PM »
Spike Damage
Authors: game_guy
Version: 1.1
Type: Damage Add-On
Key Term: Battle Add-on

Introduction

Anytime an attacker is inflicted with a "Spike" state and attacks it'll take a part of the damage it dealt to the target. Kind of like in pokemon games.
Example: You set damage rate to 40 percent. Attacker will take 40 percent of the damage dealt to him.

Features

  • Deals some damage to attacker
  • Set how much damage in percent

Screenshots

N/A

Demo

MediaFire

Script

(click to show/hide)

Instructions

In the script.

Compatibility

Not tested with SDK.
Tested with Blizz-Abs/Side View Battle System

Credits and Thanks

  • game_guy ~ For making it
  • Pokemon ~ For inspiring me to make it/the idea

Author's Notes

Enjoy!
« Last Edit: March 21, 2010, 06:19:59 PM by Hellfire's G_G »

Offline Sase

  • Transcended Spirit
  • ***
  • Posts: 174
  • LV: 5
  • Gender: Male
    • View Profile
Re: [XP] Spike Damage
« Reply #1 on: March 21, 2010, 05:29:46 PM »
If you use a negative value it will heal the attacker instead?

Offline (Hexamin)

  • Ethereal Devastator
  • ****
  • Posts: 369
  • LV: 21
  • Gender: Male
  • "Yar"
    • View Profile
Re: [XP] Spike Damage
« Reply #2 on: March 21, 2010, 05:31:46 PM »
Any way you can make this as a reversal?  I.E., if the player has the status, then anyone that attacks the attacker gets damaged?

Oh, and, I think it'd be a quick edit, but allowing each state to have its own damage?  State 1: 40%, State 2: 30%, etc., using whatever the user defines.

Then again, I could throw in a quick fix to implement that... using...

Code: [Select]
dmg = temphp.to_f / (GameGuy::DmgPercent * i * 5)

and setting DmgPercent to 1.  I believe that'd make it so state 1 would have a 5%, state 2 10%, state 3 15%, etc., etc., but there's probably an easier configuration of it anyway.


Good script though.  ^_^
Max 1111101000; characters remaining: 1110111000

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Spike Damage
« Reply #3 on: March 21, 2010, 05:33:10 PM »
Ahahahaha...
I was looking for something like this a long time ago XP

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Spike Damage
« Reply #4 on: March 21, 2010, 06:20:15 PM »
Updated. You can set the damage percent to multiple states now.

Offline (Hexamin)

  • Ethereal Devastator
  • ****
  • Posts: 369
  • LV: 21
  • Gender: Male
  • "Yar"
    • View Profile
Re: [XP] Spike Damage
« Reply #5 on: March 21, 2010, 09:32:00 PM »
awww, i love you! <3 *lvlup*
Max 1111101000; characters remaining: 1110111000

Offline AresWarrior

  • Awakened Visionist
  • **
  • Posts: 51
  • LV: 3
    • View Profile
Re: [XP] Spike Damage
« Reply #6 on: May 08, 2010, 04:53:21 AM »
This a great script! I have one question though. You say this works if the actor has the state inflicted. Well if I wanted to make a skill do this, how would I make it so that the skill adds the state to the actor? btw, the Demo link isn't working for me.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Spike Damage
« Reply #7 on: May 08, 2010, 05:01:00 AM »
You can do this in the database. Go to the Skills tab. Then select the skill and go to the right side where it says State Change. Check the box next to the Spike state and make sure its a + sign in the box.

Offline AresWarrior

  • Awakened Visionist
  • **
  • Posts: 51
  • LV: 3
    • View Profile
Re: [XP] Spike Damage
« Reply #8 on: May 08, 2010, 05:52:02 AM »
but doesnt that make the enemy have the state and not the actor using it?

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Spike Damage
« Reply #9 on: May 08, 2010, 07:18:17 AM »
Change the target of the skill to the actor. But why would you want the Actor taking damage on purpose?

Offline Starrodkirby86

  • Kirby de Varita Estelar
  • Guardian of Chaos
  • ********
  • Posts: 3282
  • LV: 194
  • Gender: Male
  • ~!
    • View Profile
    • The Archive of Starrodkirby86
Re: [XP] Spike Damage
« Reply #10 on: May 08, 2010, 07:32:27 AM »
Like in Pokemon: Double-Edge, Take Down, etc.

High power-moves with a catch. I don't see any problem in that...? There's many good reasons...

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?).



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Spike Damage
« Reply #11 on: May 08, 2010, 02:36:15 PM »
Oh I see now xD I was just kind of confused.

Offline djskagnetti

  • Awakened Visionist
  • **
  • Posts: 60
  • LV: -1
    • View Profile
Re: [XP] Spike Damage
« Reply #12 on: May 01, 2012, 03:10:58 PM »
Hi, great script as always.
I'm making a spell called Masochist that uses your Spike Damage, when cast on an enemy it does damage equal to percentage specified to the enemy when it attacks with a basic physical attack.
As a test I put the percentage of damage at 5000%.  It works, and testing it out on some enemies that do a few hundred physical damage with about 500 hps, as expected it kills them when they hit the character.
But - the enemy dies first, and then the animation and attack damage are shown on the character.  So it's like - enemy turns into red vapor and disappears (death), then sword strike animation and damage dealt to character it was attacking.
Is there a way to make it so it does the attack animation and damage dealt to the character the monster is attacking first, and then the damage % from the Spike Damage spell is done to the monster?

Also, is there a way to show the damage on the monster the spell inflicts?
Thanks!