Hero Counterattacks

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Hero Counterattacks

Post by Bob the Hamster »

Starting with tonight's nightly build, you will be able to give heroes counter-attacks:

Image

Later I hope to add the ability to override these with equipment, and maybe override them by being hit with attacks, but that will have to wait for another day.
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

WHAAAAAAAaaaAAAGHGHGHGHFHGGHGHghghgh (what's next, Petrify and Plague?)

This is awesome. I am very happy right now.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

oh happy day~
"Imagination. Life is your creation."
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

Also, there's a way to do fake if-elses using attack chaining, and you should be able to emulate any conditional counterattack using tags.

[s]Basically:
* Make an attack that is only used to chain to the real counterattack (i.e. one that does return damage or heals/buffs the counterattacker), and assign this as the counterattack to whatever element.
(e.g. Attack 0 "CSlashChk" will chain to Attack 1 "CntrSlash")

* Set the Regular Chain conditional to a Tag Check corresponding to the piece of equipment that turns on this tag (or any conditional you want)
(e.g. check Tag 2 'Sword is equipped')

* Set the Else Chain to 100% always go to the next "checking attack" that the hero will have available, and have this chain to its corresponding "real" counterattack
(e.g. Attack 2 "CBashCheck", Attack 3 "CountrBash", check Tag 3 'Club is equipped')

* Repeat steps 2 and 3 for each counterattack possibility determined by tags/equipment. The last attack in the series will of course Else Chain to nothing.[/s]

EDIT:
That was actually kind of garbage. Here's a way better method that I just tested with good results.

* Set the counterattack to whatever the first possible attack can be (e.g. CounterSlash, CounterBash, CounterStab)

* Set the Instead Chain for each one to 100% chain to the second possible counterattack, with a Tag Check seeing if the tag required to do that attack is OFF (e.g. Tag 2 'Sword is equipped' is OFF)

* At the very last possible counterattack in the series, have it Instead Chain to Nothing if the appropriate tag is OFF.

This is much better, you don't have to do a "checking" attack and the real attack as well.
Last edited by Foxley on Sat Dec 23, 2017 4:42 pm, edited 1 time in total.
User avatar
Nathan Karr
Liquid Metal Slime
Posts: 1215
Joined: Fri Jan 25, 2008 3:51 am
Contact:

Post by Nathan Karr »

Oooh, I'll finally be able to make spiked armor work!
Remeber: God made you special and he loves you very much. Bye!
User avatar
RMZ
King Slime
Posts: 1695
Joined: Tue Oct 16, 2007 12:39 am
Contact:

Post by RMZ »

Merry sliming Christmas to me!!!!

THANK YOU! Now I can get these ninjas to be comic-book accurate! From your Secret Santa present in Volume 1, you can see firsthand the opportunity of them making a SUPER BULLET!
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

I'm glad I've been slow with Kaiju work now, because this is going to make the next hero way easier to set up. Thanks!
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

Something I just thought of: will the Counter/Ctr stat become useful now?
User avatar
MorpheusKitami
Slime Knight
Posts: 218
Joined: Wed Nov 30, 2016 8:23 pm
Location: Somewhere in America

Post by MorpheusKitami »

This is certainly going to make clones of SMT easier on the player half. Although, if both the enemy and the player have a counter to the same attack, will the game notice this and automatically cut it off?
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Foxley wrote:Something I just thought of: will the Counter/Ctr stat become useful now?
The hero counterattacks work just like the enemy counterattacks, and they don't use the counter stat.

Hmmm... Although as soon as I add editor support for zzo38's new "Custom Aim Math" feature, it will become fairly easy to do counterattacks based on the Counter stat

For example, you could give your hero a counterattack that is self-targetting, and has an accuracy based on the counter stat. Then if the attack does not miss, it could chain to the actual counterattack.

I also realize that I really need to add a new attack "Prefer Target" option like "Last enemy to deal damage" or "Last attacker to trigger a counterattack"
MorpheusKitami wrote:This is certainly going to make clones of SMT easier on the player half. Although, if both the enemy and the player have a counter to the same attack, will the game notice this and automatically cut it off?
You can definitely get your hero and an enemy in an endless counterattack loop. (It was already possible to get two enemies in an endless counterattack loop)

I'm not sure what the best way is to allow attacks that only have a limited number of counterattacks. I'll have to think about that one.
Last edited by Bob the Hamster on Sat Dec 23, 2017 5:59 pm, edited 1 time in total.
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

I'm testing different counters and everything works great so far! Only thing I really need is a plotscripting option, if there isn't one already, for setting hero counters.
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

Maybe add a bitset to an attack definition "Cannot counter a counterattack" that will cause it to be ignored/skipped if it's invoked by a counterattack? Could even put the onus on the user by making a "Counterattack" bitset to go along with it.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

I think you can escape an endless loop by setting/checking a tag to check if counter-attacks are occurring. You can Instead-chain to turning this tag off and end the loop. *idea* would be a lot easier with mass-editing entries or being able to define templates.

You could use an element 'counter' to better map your counter chains.
Will multiple counter attacks occur against multiple elements in a single attack? One counter attack for each element?
Last edited by SwordPlay on Sun Dec 24, 2017 2:14 am, edited 3 times in total.
"Imagination. Life is your creation."
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Yes, I do need to add both of those things. Script commands for reading/writing counterattacks, and a way to limit counterattack back-and-forth
User avatar
FyreWulff
Slime Knight
Posts: 107
Joined: Wed Mar 13, 2013 9:16 pm
Location: The Internet
Contact:

Post by FyreWulff »

End of an era! That counter stat's just been sitting there for two decades now.
Post Reply