-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When fighting a frightened rat, some weird symbols appear #19
Comments
It is rat reaction to moving from Fear (due to Fetid Rat Skull) to Anger(due your attack) and back again... |
So this is not a bug? Certainly looks like it. |
One possible solution is to add "permanent" flag for Terror caused by Ratter aura. |
Do you want me to try and do it and pull request? I can definitely try, but I'd be happy if you give me some pointers - line numbers etc. P.S. Можно по-русски. |
O its will be great! Bellow is good places to start: P.S. Можно и по-русски |
It's not a bug - it's the rat saying a curse word. |
Thanks for the explanation @DatBoi287, I would suggest to change it to something like F$%K, so it can be understood by others. It seems like you're the only one to get this. Also, maybe it's not right for a rat to curse, since it's incapable of speech. Thoughts? |
This is Giant Marsupial Rat from highly magical world. |
I like the joke :) I want to revisit this issue. As I see it there are two things:
My thoughts:
Let's discuss this further so we can find a solution. EDIT: Nethack has an interesting approach to this - https://nethackwiki.com/wiki/Scare#Effect |
1.a Using unicode can be an option ( but this requires fixes for pixel font )
Terror buff works simple as follows: For partial solution we can do not aplly Terror buff for already fleeing Rat ( check Rat.canAttack() ) Or for more complete and complex sollution we can introduce new ai states. |
Anyway when I have time I'll start experimenting with this. |
a. We need add corresponding smile to pixel font, should be not too hard. |
Agreed to go forward with a new AI state. I guess a good one is SCARED. In that state the mob will attack only if it can't run away from the hero. What do you think? Maybe a good start will be to draw the finite state machine diagram of the current implementation (or other representation like a text description of it), and the proposed one so it's easier to follow. |
Roughly it looks-like this: ANY -terror> FLEEING |
So this is the current one: Generated with GraphViz using this code: digraph finite_state_machine {
rankdir=LR;
size="10,10"
node [shape = circle];
PASSIVE, HUNTING, WANDERING, FLEEING -> SLEEPING [ label = "lullaby()" ];
PASSIVE, SLEEPING, WANDERING, FLEEING -> HUNTING [ label = "is_attacked()" ];
PASSIVE, HUNTING, WANDERING, SLEEPING -> FLEEING [ label = "terror()" ];
HUNTING -> WANDERING [ label = "target_lost()" ];
SLEEPING, WANDERING -> HUNTING [ label = "target_spotted()" ];
} What do you think the SCARED should look like here? |
Thanks for great state graph! I believe we should look at Thief class: It is privately extends FLEEING state to something very similar to proposed SCARED state. Maybe it worth to reuse it? |
I'm frankly having hard time keeping all the info in my head for this discussion, sorry if you'll have to explain some things several times for me. The code you're talking about: private class Fleeing extends Mob.Fleeing {
@Override
protected void nowhereToRun() {
if (buff( Terror.class ) == null) {
getSprite().showStatus( CharSprite.NEGATIVE, TXT_RAGE );
setState(HUNTING);
} else {
super.nowhereToRun();
}
}
} Does this mean "If I have nowhere to run and am not terrified, start HUNTING" behavior? Or is there something else? |
It is. it is not SCARED as is due to 'terrified' part, but close enough. |
Great. I think it might be good to have something similar as well. First thing that I thought:
I'm still not sure how this will integrate with Ratter Skull and whether it will solve the flipflops of the states we have now (Fear <--> Anger). I mean that it might introduce another flipflop - |
Sorry for delayed reply. Scared may or may not inherit from Fleeing (in my opinion ai states should be not related by inheritance) Not sure if it is possible to completely avoid flipflops scenarios but it worth to try to mininize chances. For example it may be: Scared -> nowhere to run -> Berserk(immune to terror) or(50% chance) Death from fear. |
If a rat is frightened because I'm wearing a Giant Rat Skull, and I do chase it and fight it, the symbols
#$%^
appear in red above the damage number each hit. Can't screenshot it because damage points don't stay there. Version -v remix.26.fix.4
The text was updated successfully, but these errors were encountered: