Jump to content
Sign in to follow this  
estriole

Share The Pain [state]

Recommended Posts

Effect: Share The Pain [state]

- Author : Estriole

 

My first attempt at using Tsukihime Effect Manager.

as i promised tsuki... i will script using his effect manager when the effect manager finally stop evolving :P.

finally i can script something that i really want for my boss battle :D.

 

if anyone damages actor/enemy with the share the pain state.

every battler (actor and enemy) that have the same share the pain state

(you could make several share the pain state) will receive damage as well.

 

in my boss battle. the boss inflict share the pain state to one of party member(important story plot member).

and if the party member dies instant game over. :D. so we need to keep healing the party member while fighting the boss (yes of course the boss have way lot more hp than the linked member :D. so it will be tough battle). later in the story... the boss will be fought again and use the same tactic again (but improve the value so every 1hp damage will damage 10hp for the other share the pain member) but the main character is already smart enough to add autolife state to linked party member and use skill that damage friend greatly to the linked party member to make the boss eat his own medicine... :D. i share my implementation for this script.

of course it could be used differently. such only share 20% of damage (warcraft dota skill), etc.

 

Script:

 

 


=begin

 

#==============================================================================

** Effect: Share the pain

Author: Estriole

Date: Nov 2, 2012

 

Effect Manager Version : 1.6

------------------------------------------------------------------------------

** Change log

 

------------------------------------------------------------------------------

** Terms of Use

* Free to use in commercial/non-commercial projects

* No real support. The script is provided as-is

* Will do bug fixes, but no compatibility patches

* Features may be requested but no guarantees, especially if it is non-trivial

* Preserve this header

------------------------------------------------------------------------------

if anyone damage actor/enemy with this state. all the party member/ troop member

that have the same state will suffer the same damage.

 

tag the state with this:

 

<eff: share_the_pain x>

 

Where x is the percentage of damage that should be shared.

By default it is 1, which means 100%

to make every 1hp damage deal 10hp damage to other share the pain... change it to 10

to make only 20% just change to 0.2

 

#==============================================================================

=end

$imported = {} if $imported.nil?

$imported["Effect_ShareThePain"] = true

#==============================================================================

# ** Rest of the script

#==============================================================================

module Effect

module Share_The_Pain

Effect_Manager.register_effect(:share_the_pain)

end

end

 

class Game_Battler < Game_BattlerBase

 

def state_effect_share_the_pain_guard(user, state, effect)

#return if user == self

return if @result.hp_damage <=0

mod = eval(effect.value1[0]) rescue 1

hp_damage = (@result.hp_damage * mod).to_i

for member in $game_party.battle_members

next if !member.state?(state.id)

member.hp -= hp_damage if hp_damage >0

member.perform_collapse_effect if member.dead?

 

@result.effect_results.push("%s shared the pain and received %d damage" %[member.name, hp_damage.to_i])

end

for enemy in $game_troop.members

next if !enemy.state?(state.id)

enemy.hp -= hp_damage if hp_damage >0

enemy.perform_collapse_effect if enemy.dead?

@result.effect_results.push("%s shared the pain and received %d damage" %[enemy.name, hp_damage.to_i])

end

@result.success = true

end

end

 

 

 

 

 

Required: Effect Manager

minimum version 1.6

Usage

 

Tag your item/skill with

<eff: share_the_pain x>

Where `x` is the hp multiplier in float.

1 means 100% damage

Edited by estriole

Share this post


Link to post
Share on other sites

I remember seeing this in some final fantasy game. FF9 I think.

 

It was the worst state to have cause then that means whenever the enemy attacked my character with the pain share state, all of my weaker (mages) would get a bunch of damage and I couldn't do anything about it.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

oh my god. i have made the worst state for player... many player will hate me for this :D.

 

i play ff ix but not until ending so i guess i miss that state troubled you mentioned. so i don't know how annoying it would be.

for warlock skill of warcraft dota. it also could be devastating if used right.

 

the reason why i made this (and the boss battle concept of mine) because of some movie i watch.

in that movie... the enemy is the mirror of the actor and when the enemy wounded the actor also wounded. i forgot what movie (or maybe anime? but i think it's movie) which i get that inspiration. but the idea is written in my idea excel spreadsheet. because of i forgot now i write the idea and where i got them to prevent this incident again.

 

 

 

why i made idea excel spreadsheet in first place?

sometimes i stumbled for great idea for games when watching movie, anime, music clip, comic, or just walking around and talk.

but i'm really forgetful >.<. (i'm afraid i will have Alzheimer when i get old. pray that i won't >.<)

and the game i'm planning to make have lots of character (i planned to have suikoden like game 100++ char) and of course it would be plain if it's only character that join you just by talking to them. i need good story for them. the spreadsheet also contain the switch and variable i used for and also chart, etc that needed. so it's helpful in designing a game.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×