Tsukihime 1,487 Posted October 8, 2012 (edited) Effect: Thorn Mail -Tsukihime This script adds "thorn mail" effect to your armors. When a battler attacks you, the enemy will receive damage in return. Download Script: Download here Required: Effect Manager Usage Tag your armors with <eff: thorn_mail x> Where x is the amount of damage that will be inflicted.Note that you can use a formula (without spaces) with the following keywords: user - the person that is attacking you self - you <eff: thorn_mail user.def> This will deal damage equal to the attacker's def. Edited March 10, 2016 by Tsukihime 1 PhoenixSoul reacted to this Share this post Link to post Share on other sites
Galv 1,386 Posted October 8, 2012 Guessing someone has played League of Legends? (dunno if thornmail is anywhere else haha) I'm really liking all these effects you've got going. Nice job. Share this post Link to post Share on other sites
Tsukihime 1,487 Posted October 8, 2012 Nope, though it might be called something else in some other game. This was to test the new armor effects I've added to the effect manager. Share this post Link to post Share on other sites
nameokh 0 Posted October 8, 2012 I think a perfect skill, but I can also assign it to an enemy like FF12 elementals? Share this post Link to post Share on other sites
Xypher 176 Posted October 24, 2012 Is there any way to get a states version of this? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted October 24, 2012 (edited) I think you just have to write alias :state_effect_thorn_mail_guard :armor_effect_thorn_mail_guard Under it. Otherwise you will have to copy the definition def state_effect_thorn_mail_guard #copy from armor effect end Or separate it into its own method and just have each type call it. Edited October 24, 2012 by Tsukihime Share this post Link to post Share on other sites
Xypher 176 Posted October 25, 2012 Using the alias worked, thanks. Share this post Link to post Share on other sites
ekomega 20 Posted November 16, 2012 I know you don't do compatibility... but I noticed with your Thornmail and Vampire weapon scripts, they don't popup the reflected damage or vampire healing with Yanfly's popup scripts (although the damage/healing is noted in the text box). Since you don't have a popup script of your own, I was hoping there was an easy solution. Any help? Thanks! Share this post Link to post Share on other sites
Tsukihime 1,487 Posted November 17, 2012 (edited) There is no easy solution. If you added yanfly's popups, you will be getting one popup for EVERY effect. This means that if you had 10 effects, you will get 10 different popups. Yanfly's popups are not flexible in the sense that it displays as soon as there is something to display. That is not intuitive because if you took 200 damage, your shield absorbed 100 damage, and you reflected 50 damage, it would be ugly to see yourself get hit for 200, heal for 100, and then somehow reflect 50 by healing another 50? Edited November 17, 2012 by Tsukihime Share this post Link to post Share on other sites
ekomega 20 Posted November 17, 2012 (edited) I can see your point, if you use a lot of your modification scripts. Although, I'm wondering if it really looks that bad. Do you have a screenshot? Some people like seeing lots of numbers. If you get hit with thornmail, there's a popup on you for damage and on the enemy for damage. And for vampire, it's also damage on enemy and healing on you. Those don't sound so bad, as the popups are on different targets. Mana Shield added in to that mix would get confusing. But you could do popups for the others and not mana shield, if you wanted... Anyway, thanks for the response. Edited November 17, 2012 by ekomega Share this post Link to post Share on other sites
Tsukihime 1,487 Posted November 17, 2012 (edited) I did a quick test the other day since someone also requested it and it looked really bad. First, there is a random null popping up. Second, thorn mail popups aren't working properly: if the attacker took damage from thorn mail, it wouldn't show up. I imagine this is because the default engine doesn't support anything like this and therefore there was no need to implement it. And third it just isn't intuitive. Here, I did 50 damage, and OF that 50 damage I absorbed 10. These popups make it look like I did 60 damage. It is trivial to make the popups: simply assign values to the result (eg: result.hp_damage, result.hp_drain, result.mp_damage, result.critical, etc) def armor_effect_thorn_mail_guard(user, armor, effect) return if user == self damage = eval(effect.value1[0]) user.hp -= damage user.perform_collapse_effect if user.dead? user.result.hp_damage = damage # new @result.effect_results.push("%s takes %s damage!" %[user.name, damage]) @result.success = true make_damage_popups(user) # new end But it's not working for thorn mail. Edited November 17, 2012 by Tsukihime Share this post Link to post Share on other sites
ekomega 20 Posted November 17, 2012 This is very clear, thank you. Share this post Link to post Share on other sites
Ctelin Ajira 0 Posted May 17, 2013 How do I get thorn mail to deal the same damage the attacker dealt? Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 17, 2013 Use @result.hp_damage for the formula Share this post Link to post Share on other sites
Omen613 8 Posted May 17, 2013 Any chance you could tweak this to work on states as well? Love your scripts. Share this post Link to post Share on other sites
estriole 326 Posted May 21, 2013 I think you just have to write alias :state_effect_thorn_mail_guard :armor_effect_thorn_mail_guard Under it. Otherwise you will have to copy the definition def state_effect_thorn_mail_guard #copy from armor effect end Or separate it into its own method and just have each type call it. @omen: hime already answer that question Share this post Link to post Share on other sites
Audrey 2 Posted June 15, 2013 Is there any way I could either have it so I tag skills that I want to be included to cause response from the thorn armor, a tag to un-included skills from causing a response, or that I can have it so only skills with Same As Attack applied cause a response? 'Cause the way you have it, all physical skills cause a reaction. I have several physical spells like Jagged Rock where the power is determined by the user's MAT and the enemy's DEF, but it is counted as a physical attack. This is to be effected by things such as Damage from Physical Skills and whatnot. Share this post Link to post Share on other sites
onikuma 1 Posted January 17, 2014 Anyway to get this working with Yanfly Engine Ace - Ace Battle Engine v1.22? The damage doesn't pop up. Share this post Link to post Share on other sites
tiagoms 2 Posted June 8, 2014 There is no way to put PopUp? Share this post Link to post Share on other sites
Ata Nacius 3 Posted April 11, 2015 (edited) Hello Hime, If I want achieve this result: - If the ennemy hit me, it deal the EFFECT of Thorn Mail <<= Already functional. - If the Hero hit the ennemy, it deal the EFFECT of Thorn Mail <<= how achieve this in the code? I'm wondering how it could be achieved as I want. (want add I use this on State Effect not on Armor/Skill/Item or any other ways.) Thanks by advance (also if someone know how to make that, please.. help ) ! Edited April 11, 2015 by Ata Nacius Share this post Link to post Share on other sites
Player One 9 Posted April 11, 2015 (edited) @Ata Nacius This is my Vice Versa state. It's edited Thorn Mail effect. Tag your state with ex. <eff: vice_versa 0.5>, then whenever a battler with that state recive damage original caster recive half of that damage. If you use <eff: vice_versa -0.5> then attacker will gain hp = 1/2 damge dealted to battler with vice versa state. =begin #============================================================================== ** Effect: Vice Versa Require: Hime - Effect Manager Modified version of Thorn Mail effect. Thorn Mail Author: Hime ------------------------------------------------------------------------------ ** Terms of Use (from Hime Thorn Mail) * Free to use in non-commercial projects * Contact me for commercial use * 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 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Tag your state with: <eff: vice_versa x> (ex. <eff: vice_versa 0.5>) Where x is the amount of damage they will receive. #============================================================================== =end $imported = {} if $imported.nil? $imported["Effect_ViceVersa"] = true #============================================================================== # ** Rest of the script #============================================================================== module Effect module Vice_Versa Effect_Manager.register_effect(:vice_versa) end end class Game_Battler < Game_BattlerBase def effect_vice_versa(user, item, effect) return if user == self return if @result.hp_damage <= 0 #damage = eval(hp.damage).to_i mod = eval(effect.value1[0]) #rescue 1 #damage = (@result.hp_damage * mod).to_i hp_damage = (@result.hp_damage * mod).to_i #damage = @result.hp_damage #user.hp -= damage #user.hp -= @result.hp_damage user.hp -= hp_damage user.perform_collapse_effect if user.dead? @result.effect_results.push("%s takes %s damage!" %[user.name, hp_damage]) @result.success = true if $imported["YEA-BattleEngine"] if mod > 0 user.create_popup(hp_damage, "HP_DMG") elsif mod < 0 user.create_popup(hp_damage, "HP_HEAL") end end end alias :state_effect_vice_versa_guard :effect_vice_versa alias :enemy_effect_vice_versa_guard :effect_vice_versa alias :actor_effect_vice_versa_guard :effect_vice_versa end class Game_Actor < Game_Battler alias :armor_effect_vice_versa_guard :effect_vice_versa alias :weapon_effect_vice_versa_guard :effect_vice_versa end Otherwise if you asking about backfire effect try use Hime Effect: Vampiric Weapon and give it negative value ex. <eff: vampiric_weapon -0.5>, should work. Edited April 11, 2015 by Player One Share this post Link to post Share on other sites
Ata Nacius 3 Posted April 11, 2015 Hello Player One, I read your code and I come back after some time for tell if it is ok. For the moment, I THANKS YOU really so much for taking your time to helping me, much appreciated! Really. Share this post Link to post Share on other sites
Ata Nacius 3 Posted April 15, 2015 Ok, Player One, with your sample for which I was learning how works HimeWorks - Effects Manager I ended finally to create the effect I wanted to achieve. This take me some time and also some coffee lol, but, well, I'm happy with it. Later I will publish it as a "Finalized Script" in the appropriate section. (as I'm French, I must just translate my script before publish it. Héhé) Share this post Link to post Share on other sites
SamHain 0 Posted June 13, 2015 I seem to be having a small issue. I have a character that uses a defensive skill that applies a thornmail state to all party members. However, upon applying the state to the party, the actor applying the state takes thornmail damage. What do I need to do to prevent that from happening? Share this post Link to post Share on other sites