autobasement, wham and coldform etc...

fronobulax

Developer
Staff member
I'm putting this here since I don't know where the best place for it would be.

I'm using autobasement, wham and implicitly smartstasis and batbrain. Several times combat will fail. It seems that damage predictions are not taking into account the presence of the various elemental forms, such as coldform. Predicted damage is quite high, but actual damage seems to be 1 HP.

Clearly one solution would be for autobasement to uneffect the forms prior to certain types of combat. I'm fine with that since in aftercore buying soft green whatevers is trivial, but I'm sure there is someone who is obsessed with optimization rather than automation who might object to uneffecting something that might be useful.

The other solution would be to to make damage predictions aware of the elemental forms. My hunch is that is not easy or it would have been done already?

Ideas? Suggestions? I can certainly deal with it using a BBS or something similar but...
 

lostcalpolydude

Developer
Staff member
Nothing in the basement is immune to any element, so uneffecting a form should not be helpful there. Post a specific example and maybe we can see what is actually happening. Maybe a shard of double-ice is being used along with coldform?
 

fronobulax

Developer
Staff member
While we wait for a specific example that I can post, what are the KoL mechanics that might possibly cause Weapon of the Pastalord and Saucegeyser to only do 1 HP damage? Since the situation only occurs when running autobasement, feel free to ignore Flavor and similar possibilities that autobasement is not going to use. Thanks.
 

lostcalpolydude

Developer
Staff member
Normally that would never happen in the basement. However, shards of double-ice are decent cheap combat items, so it would make sense that those are picked. Once they are used, the monster is cold-aligned. If you are also cold-aligned, anything you do will do 1 damage. The solution in that case is for those scripts to not use that combat item when you have coldform active.

If it is something different, then an example will be needed to figure it out.
 

fronobulax

Developer
Staff member
Here is an example. The first combat was under control of autobasement and wham. The second was manual.

Code:
[3059] Fernswarthy's Basement (Level 166)
Encounter: The Ghost of Fernswarthy's great great great great great great great great great great Grandfather
Round 0: cafebabe loses initiative!
 > WHAM: Running SmartStasis
 > WHAM: Starting evaluation and performing of attack
 > WHAM: Enqueuing a stun to help with the battle
Round 1: cafebabe executes a macro!
Round 1: cafebabe casts ENTANGLING NOODLES!
Round 2: cafebabe casts SAUCEGEYSER!
Round 3: the ghost of fernswarthy's n great-grandfather takes 327 damage.
Round 3: cafebabe casts WEAPON OF THE PASTALORD!
Round 4: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 271 hit points
 > WHAM: Starting evaluation and performing of attack
Round 4: cafebabe executes a macro!
Round 4: cafebabe casts WEAPON OF THE PASTALORD!
Round 5: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 261 hit points
 > WHAM: Starting evaluation and performing of attack
Round 5: cafebabe executes a macro!
Round 5: cafebabe casts WEAPON OF THE PASTALORD!
Round 6: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 263 hit points
 > WHAM: Starting evaluation and performing of attack
Round 6: cafebabe executes a macro!
Round 6: cafebabe casts WEAPON OF THE PASTALORD!
Round 7: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 297 hit points
 > WHAM: Starting evaluation and performing of attack
Round 7: cafebabe executes a macro!
Round 7: cafebabe casts WEAPON OF THE PASTALORD!
Round 8: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 263 hit points
 > WHAM: Starting evaluation and performing of attack
Round 8: cafebabe executes a macro!
Round 8: cafebabe casts WEAPON OF THE PASTALORD!
Round 9: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 262 hit points
 > WHAM: Starting evaluation and performing of attack
Round 9: cafebabe executes a macro!
Round 9: cafebabe casts WEAPON OF THE PASTALORD!
Round 10: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 260 hit points
 > WHAM: Starting evaluation and performing of attack
Round 10: cafebabe executes a macro!
Round 10: cafebabe casts WEAPON OF THE PASTALORD!
Round 11: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 294 hit points
 > WHAM: Starting evaluation and performing of attack
Round 11: cafebabe executes a macro!
Round 11: cafebabe casts WEAPON OF THE PASTALORD!
Round 12: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 293 hit points
 > WHAM: Starting evaluation and performing of attack
Round 12: cafebabe executes a macro!
Round 12: cafebabe casts WEAPON OF THE PASTALORD!
Round 13: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 278 hit points
 > WHAM: Starting evaluation and performing of attack
Round 13: cafebabe executes a macro!
Round 13: cafebabe casts WEAPON OF THE PASTALORD!
Round 14: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 297 hit points
 > WHAM: Starting evaluation and performing of attack
Round 14: cafebabe executes a macro!
Round 14: cafebabe casts WEAPON OF THE PASTALORD!
Round 15: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 290 hit points
 > WHAM: Starting evaluation and performing of attack
Round 15: cafebabe executes a macro!
Round 15: cafebabe casts WEAPON OF THE PASTALORD!
Round 16: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 283 hit points
 > WHAM: Starting evaluation and performing of attack
Round 16: cafebabe executes a macro!
Round 16: cafebabe casts WEAPON OF THE PASTALORD!
Round 17: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 287 hit points
Round 17: cafebabe attacks!
Round 18: the ghost of fernswarthy's n great-grandfather takes 1 damage.
You lose 292 hit points
 > lost the fight, quitting
 > Basement sucessfully automated for 23 out of 87 adventures.
 > You've had the crap beaten out of you... attempting to find some more crap.

Visiting Relaxing Hot Tub in clan VIP lounge
You lose an effect: Beaten Up
You gain 3,937 hit points
 > Restoring HP! Currently at 3948 of 3948 HP, 18 of 1250 MP, current meat: 212415 ... Target HP = 3751.

use 1 cold-filtered water
You acquire an effect: Purity of Spirit (duration: 10 Adventures)

[3060] Fernswarthy's Basement (Level 166)
Encounter: The Ghost of Fernswarthy's great great great great great great great great great great Grandfather
Round 0: cafebabe loses initiative!
You lose 169 hit points
Round 1: cafebabe uses the shard of double-ice and uses the shard of double-ice!
Round 2: the ghost of fernswarthy's n great-grandfather takes 2506 damage.
Round 2: cafebabe wins the fight!
After Battle: Eman bends its brim into an approximation of a smile.
You gain 373 Strongness
You gain a Muscle point!
You gain 155 Wizardliness
You gain a Mysticality point!
You gain 177 Chutzpah

This doesn't show the coldform interaction that I am suspicious about but something could be improved, right?
 

lostcalpolydude

Developer
Staff member
You're doing physical damage (since you said Flavour isn't being used) to a physically-resistant monster. Mafia has no idea what monsters are physically resistant. I don't know how mafia would usefully provide that information, or how scripts might change with or without mafia changing to account for it.

The second fight shows a shard of double-ice being used (probably what got you to that part of the log?), and it seems likely that it would be used even with coldform active.
 

fronobulax

Developer
Staff member
The double ice was me, manually.

It seems like the disconnect is that I am expecting the scripts to know a monster is physically resistant and adjust the strategy accordingly. Since that is beyond mafia's capabilities at the moment my expectation is unreasonable. Thanks for helping me figure that out.
 

Veracity

Developer
Staff member
monsters.tx says this about Fernswarthy's Grandfather:

The Ghost of Fernswarthy's n great-grandfather HP: [0.425*ceil(BL^1.4)+ML] Def: [ceil(0.9*(2*ceil(BL^1.4)+ML))] Atk: [2*ceil(BL^1.4)+ML] Init: 70 Phys: 100 P: undead

Note the 100% Physical Resistance.

That does not appear to be accessible via a $monster proxy field. It could be.

Speaking of Basement monsters - I invented the "N" name of them so that scripts and CCS could key on them. Now, KoL has officially named them "X" monsters - X bottles of beer on a golem, for example. I think we should change to conform - but that will require scripts and CCS files to change all over...
 

Winterbay

Active member
My thinking is that it appears that sometimes Weapon of the Pastalord gets incorrect calculations. I've never seen a script try to attack a physically resistant monster, but WotP pops up form time to time. Batbrain is aware of the Ghost being resistant so it's not that at least.
 

Theraze

Active member
Yes... BatBrain TRIES to make the ghost fully phys resistant, here:
Code:
      case $monster[the ghost of fernswarthy n great-grandfather]: mres[$element[none]] = 1; maxround = 50; break;
Note that it avoids 1 (of 1) damage of element type none (physical). Also, the fight can go on for 50 rounds.

As long as switch(monster) picks out the right monster... it's SUPPOSED to eliminate the physical-only attacks. I think that's on the scripts though... what Winterbay would probably need to validate that, if you aren't just going to break BatBrain to lie and say that it's a different monster... but you'll have to do a LOT of work on that. Because it blends forced last_monster bits and directed specifications... which might be part of the issue.
> ashq import <BatBrain.ash> set_monster($monster[the ghost of fernswarthy n great-grandfather]);

Factoring in Scarysauce: (6) damage, retal
ATT: 12 (5.57% × 1, death in 5173)
DEF: 11 (95.45% × 309.53, win in 7)
HP: 12.6, Value: 20.63 μ
That's with my last killed monster being a Caveman Hippy... so all of the major checks for monster_stat got redirected back to last_monster rather than staying the defined monster.
 

Winterbay

Active member
I think your +ML is 12 atm:

Code:
[COLOR=olive]> ash $monster[the ghost of fernswarthy n      great-grandfather][/COLOR]

Returned: The Ghost of Fernswarthy's n      great-grandfather
base_hp => 10
base_attack => 10
base_defense      => 9
raw_hp => 10
raw_attack => 10
raw_defense => 9
base_initiative      => 70
attack_element => none
defense_element => none
min_meat      => 0
max_meat => 0
base_mainstat_exp => 1.25
phylum =>      undead
poison => none
boss => false
image =>

Those stats gets calculated as you encounter it (dependant on basement level). With a ML of 10 I get:

Code:
[COLOR=olive]> ashq import <BatBrain.ash> set_monster($monster[the      ghost of fernswarthy n great-grandfather]);[/COLOR]

[COLOR=#880000]1      HP costs 6,667μ. ( 78, / 155 )[/COLOR]
[COLOR=#000088]1 MP      costs 80,μ. ( 7, / 7 )[/COLOR]
ATT: [B]10,[/B] (6,% × 1,, death in      2584)
DEF: [B]9,[/B] (95,45% × 200,02[B] [COLOR=purple](10,)[/COLOR][/B],      win in 1)
HP: [B]10,5[/B], Value: [COLOR=green][B]21,07 μ

[/B][/COLOR]THowever using The Man instead:
Code:
[COLOR=olive]> ashq import <BatBrain.ash> set_monster($monster[the      man]);[/COLOR]

[COLOR=#880000]1 HP costs 6,667μ. ( 155, / 155      )[/COLOR]
[COLOR=#000088]1 MP costs 80,μ. ( 7, / 7 )[/COLOR]
ATT:      [B]260,[/B] (94,% × 136,82, death in 2)
DEF: [B]234,[/B] (72,55% ×      90,82[B] [COLOR=purple](10,)[/COLOR][/B], win in 31)
HP:      [B]2 010,[/B], Value: [COLOR=green][B]5 216,38 μ[/B][/COLOR]

This with no monster at all as my last monster (just logged in).
 

Bale

Minion
Speaking of Basement monsters - I invented the "N" name of them so that scripts and CCS could key on them. Now, KoL has officially named them "X" monsters - X bottles of beer on a golem, for example. I think we should change to conform - but that will require scripts and CCS files to change all over...

I would favor that. It wouldn't be the first or last time that scripters had to change their scripts because of a mafia change.
 

Veracity

Developer
Staff member
I would favor that. It wouldn't be the first or last time that scripters had to change their scripts because of a mafia change.
Revision 11618. Time to change scripts and CCS...

Beast with X Ears
Beast with X Eyes
X Stone Golem
X-headed Hydra
Ghost of Fernswarthy's Grandfather
X Bottles of Beer on a Golem
X-dimensional Horror
 
Top