vgstation13
vgstation13 copied to clipboard
Reworks combat to work on a turn based Rock Paper Scissors system.
What this does
Completely reworks combat to work on a turn based roshambo system forever. (Not really, this can be toggled on and off for everyone (by admins), or used to curse one player to endure using it. The everyone part is toggled on, since the intention of this is to use it in an event, and then turned off for everyone in code once it's over). Here's how I'm hoping to get it to work: You attack another player, and three cards appear on the bottom of the screen, each indicating rock, paper, and scissors. Each player selects one, and the game records who wins, or if it's a stalemate. Once there have been 3 wins total, the number of scores are checked between each player, and a winner is decided. The ratio between the wins is then checked to amplify the power of the attack (Slight exception, if someone has zero wins in a full 3 round match, then their win number is set to zero to prevent fuckery). I was also thinking of adding a section after a match where the loser can either beg for more, or beg for mercy, and the winner picks an option, but I haven't fully decided how this would work. Would the loser just add a visual clue that the other player wants one thing, or would it be a vote system, where one is randomly selected between the two votes, with the winner's having a higher weight. Feedback is GREATLY welcomed for that section. This is VERY wip.
Why it's good
It's funny
What still needs to be done:
- [x] Get the basic framework done
- [x] Make this work with unarmed attacks
- [x] Add the begging for mercy portion with a weighted voting method, the winner gets two votes, and the loser gets two, and it's picked randomly between the two (winner - more | loser - mercy = 2/3 chance of more, 1/3 chance of mercy)
- [x] Find a way to completely freeze a player when they are in battle (can't interact, move, or be interacted with. Might just teleport them elsewhere if I need to, hopefully not)
- [x] Add stunbaton interactions
- [x] Add gun interactions (if cursed, can't fire/get hit with projectiles, except for tasers (if feeling insane enough could add a battle for whether or not the taser bolt is reflected back) <--- did this for all guns because LOL!!!!
- [ ] Add interactions with kicking and biting
- [ ] Add pulse demon interactions
- [ ] Implement battle music for as many jobs as I can muster
- [ ] Figure out how to make a temporary zoom in of a character's face
- [ ] Sound effects
- [ ] Convert to emote so people can use it recreationally
- [ ] Get more sprites for the cards, and hopefully a 7 second meter/timer thing (cards, something like 152x192, meter is thing and stretches across the width of the screen)
- [ ] Code polish
- [ ] Add effects when someone loses 3 times in a row (thrown back a couple of tiles, maybe a wilhelm scream)
- [ ] Extensive testing
- [ ] Turn cursing someone into a wizard spell, possibly also a virus symptom
- [ ] Add a check for whether or not someone attacking/being attacked is a player or an NPC (w/ testing)
- [ ] Fix attack text outputs reversing when the player on the defense gets an advantage (just figuring out where this code IS should make this incredibly easy) <--- please help
- [ ] Mechs?
Changelog
:cl: *tweak: Fixes combat.
Here's a mockup I did a while ago. Inspired by that one minigame in wario ware gold.
LUMMOX HIRE THIS MAN
how do I set to dratf
how do I set to dratf
Press the set to draft button right next to the OP message (or ctrl+f the word draft).
Implement it as a wizard curse as well (that as a side effect also affects the wizard) so we may have an alt-gunk that isn't pushwiz, invisipunch wiz, mobwiz or curse of the hangman wiz.
Press the set to draft button right next to the OP message (or ctrl+f the word draft).
Thanks
Implement it as a wizard curse as well (that as a side effect also affects the wizard) so we may have an alt-gunk that isn't pushwiz, invisipunch wiz, mobwiz or curse of the hangman wiz.
Will do, once I start ironing this out. Added to the list.
✌️
holy shit
Aye Neil.
cerebral PR
@ExpulsionSnooper you are doing the lords work, godspeed you magnificent bastard
I decided to go all in and make getting hit with a projectile fired by another player trigger a battle. This doesn't have any sort of visual feedback for it yet. Speaking of that, if any UI designers/spriters are reading this, please contact me, I need some help with the polishing side of this, since the gameplay side is pretty much finished now.
Was going to fix the above issues, but for whatever reason all melee combat stopped reversing damage, so expect (even more) delays.
I've been rather busy, but I double checked and things seemed to be fixed. I assume this problem arose when I started working on #33111 ,most likely due to git fuckery. Expect more updates soon.
very powerful pr
How does this handle combat with mobs? Does it revert to the standard, or do we have space bears picking cards?
My hope for how I'd work is that combat would be normal if there's no player inside of it, so mob interactions should hopefully be covered by the end of this, but only reserved for actual players. I could turn it on for NPCs, but the point of it being turnbased is that you are competing against another player/able to taunt them, not that you're playing an RNG thing with some simplistic AI.
Alright, I seriously need some help. I'm currently trying to implement this for kicking and biting, but for whatever reason, I am completely unable to apply damage do the kicker/biter. Starting a battle works, but just not applying damage. The code is in D:\Programming stuff\vgstation13\code\modules\mob\living\carbon\human\human_attackhand.dm . If anyone can help me with this I will be incredibly grateful, but for now, I'm just going to try and work on a different part.
D:\Programming stuff\vgstation13\code\modules\mob\living\carbon\human\human_attackhand.dm
I'm having heavy early 2010s flashbacks with that link.
I am completely unable to apply damage do the kicker/biter.
What are the values of src
, M
, damage
, rps_percentage
, and affecting
right before src.apply_damage()
and M.apply_damage()
are called? Maybe somethings off there and you could check by:
message_admins('src: [src] | M: [M] | damage: [damage] | rps_percentage: [rps_percentage] | affecting: [affecting]')
@Hinaichigo I've tried what you said above, everything looked like how it should (src is the defender, M is the attacker, damage is fine, rps_percentage, etc), but then I noticed something incredibly strange. Even though I was doing M.applydamage, the damage was still going to the defender, even when they reversed the attack! I am incredibly stumped.
Hmm.. that kind of makes it sound like maybe somewhere in one of the child proc overrides of apply_damage()
, it's being applied to usr
, the caller of the proc, instead of src
(which would be M
).
What mobs are you using to test for src
and M
?
When looking at the beginning of the proc, src should probably be /mob/living/carbon/human, and M should be mob/living/carbon/human/ (full thing says mob/living/carbon/human/M as mob if that matters)
is it dead bros
rockpaperscissor bros we got too cocky...
This could also be implemented as a cooperative emote. You do rock paper scissors then wait, then check for someone to do the same within a couple tiles. You rock paper scissors normally. Kinda like the TF2 emote system.
I've been fairly busy/a little burnt out, so I might put this on official pause for now. I will most likely start work on another one of my planned projects (wall clown antag/sleeping in a bed and going afk lets ghosts take over your body). There's also a decent chance that when I get back to this I'm writing it from the ground up, since by the point where I was with this I figured out a couple of ways to make this work easier but it would require an entire rework.
This could also be implemented as a cooperative emote. You do rock paper scissors then wait, then check for someone to do the same within a couple tiles. You rock paper scissors normally. Kinda like the TF2 emote system.
I'm planning to do that.
no no NO NO NO NO NOONONONO
don't worry I will probably reopen this in a week or two when I get a surge of inspiration
the dream is dead...
bros... Shangri la was real and we killed it...