Illarion's NeoStasis script v1.4

gemelli

Member
[quote author=BDrag0n link=topic=799.msg4446#msg4446 date=1178311932]
Odd - the line print("Monster has "+monster_hp()+" HP left"); at the start of the round which I was using shows the monster HP decreasing every turn. Are you using the current SVN or the public release?[/quote]
The public release, 11.0. Perhaps something was changed in a more recent build? In any case, hmm.
 

BDrag0n

Member
[quote author=illarion link=topic=799.msg4427#msg4427 date=1178239126]
Definitely noodled - basically, the script doesn't know how to deal with a noodled opponent if you don't have sauce spells.
[/quote]
Strange, I can't find any reason for the loop - if you've no sauce spells, it should return $skill[none] and either cleesh it or abort. Cleesh might not be the best choice, but it should still be doing *something* - even if it's just aborting. However, removing the noodle check from LTS safe is probably the quickest and easiest option - if you can 1-hit an LTS is fine. The risk then is that TS/LTS might be preferred for a 2-hit kill, when the enemy is noodled - however if I add the noodle check in just as the 2-hit logic starts, that should be OK. The relevant section of code would look like
Code:
	boolean LTS_safe = true;
	if(eek==$monster[Procrastination Giant] ||eek==$monster[Apathetic Lizardman] ||  eek==$monster[acid blob] || CheckPhysicalResistance(eek))
	{ 
          LTS_safe = false;
          if(dbug) Print("Don't hit it!");
          }

	skill whichSkill=$skill[none];

	Whichskill = Choose_skill(hp_target, LTS_safe);

	//If a 1-hit isn't possible, it's worth casting noodles - but only if we've at least 3 rounds to play with
	if(WhichSkill==$skill[none] && CheckSkill($skill[entangling noodles])==0 && bUsedNoodles==false && giRound<27)
	{
                if(dbug) Print("No 1-Hit Kill. Noodling");
		use_skill($skill[entangling noodles]);
		set_property("IllNeoStasis_UsedNoodles", "true");
		set_property("IllNeoStasis_EnemyNoodled", "true");
		return;
	}
	if(WhichSkill=$skill[none])	//no 1-hit kill, check for 2-hit
		{ 
                if(gbEnemyNoodled) LTS_safe=false;)
		hp_target=hp_target/2;
		Whichskill = Choose_skill(hp_target, LTS_safe);
		}
What do you think?
 

BDrag0n

Member
[quote author=gemelli link=topic=799.msg4447#msg4447 date=1178314682]

The public release, 11.0.  Perhaps something was changed in a more recent build?  In any case, hmm.
[/quote]

Yeah, Hmmm - I'm now seeing the same behaviour, which is very strange to say the least.

Also boo! Anti-dotes now no longer w*rk for this script.
 

DarthDud

New member
[quote author=BDrag0n]
Also boo! Anti-dotes now no longer w*rk for this script.
[/quote]
Apparently if you use a penguin contract without a penguin equiped, it does the same thing as antidotes used to do.
 

BDrag0n

Member
[quote author=DarthDud link=topic=799.msg4472#msg4472 date=1178490454]

Apparently if you use a penguin contract without a penguin equiped, it does the same thing as antidotes used to do.
[/quote]
Yep, Gemelli added that in 1.7, I think - but a) I'm not sure it works anymore following the changes and b) I don't have a penguin to test a).
 

illarion

Member
So what, have antidotes been fixed in-game? What happens now if you try to use one? Just a thumb twiddle?

(Spot the guy with no time to play :( ).
 

gemelli

Member
Well, good news and bad news. The good news: using the contracts does indeed work for now. The bad news: Mafia assumes that the contract has been used up after the first time you try to throw it. So you get exactly one combat round of doing nothing in this script, and then you're back to throwing junk. And you have to refresh your inventory between battles to get even that one round of use.

Any ideas for working around this?
 
[quote author=gemelli link=topic=799.msg4478#msg4478 date=1178547029]
Any ideas for working around this?
[/quote]

directly invoke the url via visit_url?
 

gemelli

Member
My temporary workaround, which assumes that you've put a contract in your inventory already:

Changes to config section:

//Change to false if goodfella contract is changed!
boolean USE_GOODFELLA = true;
boolean gf_override=true;

Changes to DontHurtHim():

if ((item_amount($item[goodfella contract])>0 || gf_override) && USE_GOODFELLA && my_familiar()!=$familiar[Penguin Goodfella])

In other words, as long as I have gf_override set to true, it'll try to use the contract even if Mafia doesn't think I have one.  It's a hack, but it works.

EDIT: Well, they just fixed the Goodfella loophole, too. It was nice while it lasted, anyway :)
 

illarion

Member
Crap, so, the antidote, joybuzzer and contract stuff needs to go... does the dictionary still work?

/em grumbles about bugfixes causing rewrites

Are either of my fellow scripters eager to do these changes? I might get a chance to do a little on it over the next day or two, with luck, otherwise :)
 

gemelli

Member
The dictionary still works, yup. It's the only thing I know of that does.

I'm not likely to find time to work on it myself until Thursday at the earliest. If either of you are so inclined, please feel free :)
 

BDrag0n

Member
As requested - this includes some not-tested work on familiar stuff. Basically, I'm adding the potential familiar MP restores from Lion & Hobo in the MANA_MAX check, and a nice red-text warning that the hobo is out of booze.

I've added an option to turn those checks off, though.

BD.

Edit: I also set the gf_override to false!
 

Attachments

  • NewAshStasis.ash
    41.9 KB · Views: 44

illarion

Member
Thanks BDragon, I'll give it a try tomorrow.

I've been meaning to have a poke, but my version is all out of sync, so will be good to work from a common base.
 

gemelli

Member
I like the new version from a read-only perspective (haven't tested yet). A few nits:

(1) We can take out all the Goodfella stuff, too :(

(2) I really like the MANA_MAX changes you added. Can I suggest two more:

if(have_effect($effect[purple tongue]) > 0) MANA_MAX=MANA_MAX-20;
if(have_effect($effect[heart of orange]) > 0) MANA_MAX=MANA_MAX-3;

(3) Change "scroll of turtle summoning" to "turtle totem" throughout.

Danke!
 

BDrag0n

Member
OK, this includes the changes suggested by Gemelli - but is untested since I can't get access to KoL at w*rk. It will likely not be functional in any except the latest SVN build, as mafia will not recogise "turtle totem" as a combat-usable item.

there again, it might!

Edit: As I said, untested - replaced with a version that at least verifies correctly!
 

Attachments

  • NewAshStasis.ash
    41.7 KB · Views: 45

BDrag0n

Member
Of course!

Mighty Xerxes has raised questions about adding delevelling options - but it'll be a while before I have any time to devote to that, so this is just as previous:
 

Attachments

  • NewAshStasis.ash
    41.7 KB · Views: 62
Top