Eval Collection: Death Mark

For everyone who plays LoL: This is basically the effect on Zed’s ultimate.

For everyone else: Death Marks are states that deal damage when they are removed (no matter if they are cured or their duration runs out)

Requirements:

♦ YEP_BuffsStatesCore

dm1

 

When the state is removed, this happens:

dm2.png

To recreate this effect, you’ll need to define a variable in the Skill’s damage formula. My Death Mark skill uses this formula:

Death_Mark = 500 + a.atk * 6;300 + a.atk * 4

Let’s just quickly look at the two parts of this formula:

Death_Mark = 500 + a.atk * 6;
This determines how much damage the death mark will deal.

300 + a.atk * 4
This is the damage of the actual skill.

Don’t rename the variable (Death_Mark). Only alter the damage.


 

Use this in the Death Mark state’s notebox:


<Custom Remove Effect>
user.gainHp(-Death_Mark);
user.startDamagePopup();
if (user.hp <= 0) { user.performCollapse() };
</Custom Remove Effect>

If you have a formula that results in a negative number the Death Mark will heal the target.

 

 

Advertisements

5 thoughts on “Eval Collection: Death Mark

      1. Oh my gosh thank you so much for sharing!!! I hate to ask this since it’s not one of your plugins but would you happen to know how to make it reference the stat of the actor who knows the skill without directly writing $gameActors.actor(#) ? If you don’t like already know please ignore me I’d hate to put you out for something that has nothing to do with you.

        Like

      2. I added a function to the plugin to be able to reference the current actor by using $gameParty.cay()

        So if you’d want to get the current actor’s ATK you’d use: $gameParty.cay().atk

        Here’s the same plugin with my added function:

        /*:
         * @plugindesc Adds a new escape code, that allows to isert arbitrary script calls inside text (for example messages).
         * <Iavra Text Eval>
         * @author Iavra
         *
         * @param Escape Code
         * @desc Code to be used to insert evaluated expressions. {eval} serves as a placeholder for the expression.
         * @default #{{eval}}
         */
        
        (function($) {
            "use strict";
        
            var _params = $plugins.filter(function(p) { return p.description.contains('<Iavra Text Eval>'); })[0].parameters;
            var _param_escape = _params['Escape Code'];
        
            var _eval = new RegExp(_param_escape.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&").replace('\\{eval\\}', '([\\S\\s]+?)'), 'g');
            var alias_convertEscapeCharacters = $.prototype.convertEscapeCharacters;
            $.prototype.convertEscapeCharacters = function(text) {
                return alias_convertEscapeCharacters.call(this, text.replace(_eval, function(m, c) { return Math.floor(eval(c)); }));
            };
        	
        	Game_Party.prototype.cay = function() {
        		if (SceneManager._scene instanceof Scene_Battle) { return BattleManager.actor()
        		} else { return $gameParty.menuActor(); };
        	};
        
        })(Window_Base);
        

        Liked by 1 person

Write a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s