Bug - Fixed Specials actions not applied when not using a CCS

slyz

Developer
with r9104
Code:
autoOlfact: monster the black knight
autoPutty: monster the black knight

Request 8 of 10 (Woods: Black Forest) in progress...

[7902] Black Forest
Encounter: The Black Knight
Strategy: attack with weapon
Round 0: slyz wins initiative!
Round 0: slyz attacks!
Round 1: slyz attacks!
Round 2: the black knight takes 331 damage.
Round 2: Yuk leaps on your opponent, sliming him for 19 damage. It's inspiring!
Round 2: the black knight takes 19 damage.
You gain 19 Mana Points
Round 2: slyz wins the fight!
You gain 325 Meat
After Battle: Yuk hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: black sword
You acquire an item: black shield
You acquire an item: black greaves
After Battle: Yuk looks up at you guiltily before disgorging a piece of equipment.
You acquire an item: black helmet
You gain 3 Strengthliness
You gain 20 Mysteriousness
You gain 6 Smarm

> get battleAction

attack with weapon

> get autoOlfact

monster the black knight

> get autoPutty

monster the black knight

> inv putty

Spooky Putty sheet

> ash have_skill( $skill[ olfaction ] );

Returned: true

I also had enough MP to cast olfaction.

With the following CCS, everything seems to work correctly:
Code:
[ black knight ]
1: special action
2: attack

[ default ]
1: attack

Code:
autoOlfact: monster the black knight
autoPutty: monster the black knight
Casting Summon BRICKOs 1 times...
You acquire BRICKO brick (3)
Summon BRICKOs was successfully cast.

Request 2 of 10 (Woods: Black Forest) in progress...

[7909] Black Forest
Encounter: The Black Knight
Strategy: D:\dloads\KoLMafia\ccs\test.ccs [black knight]
Round 0: slyz wins initiative!
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
****if hascombatitem 1965
********call mafiaround; use 1965
********goto mafiampexit
****endif
****if hascombatitem 345
********call mafiaround; use 345
********goto mafiampexit
****endif
****if hascombatitem 518
********call mafiaround; use 518
********goto mafiampexit
****endif
****abort "No MP restoratives!"
****mark mafiampexit
endsub#mafiamp
#mafiaheader
while mpbelow 40
****call mafiamp
endwhile
if hasskill 19
****call mafiaround; skill 19
endif
mark mafiafinal
call mafiaround; attack
goto mafiafinal

Round 1: slyz executes a macro!
Round 1: slyz casts TRANSCENDENT OLFACTION!
You acquire an effect: On the Trail (duration: 40 Adventures)
Round 2: Yuk paces around aimlessly, making wet squishy noises.
Round 2: slyz attacks!
Round 3: the black knight takes 333 damage.
Round 3: Yuk paces around aimlessly, making wet squishy noises.
Round 3: slyz wins the fight!
You gain 397 Meat
After Battle: Yuk hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: black shield
You acquire an item: black helmet
You acquire an item: black greaves
After Battle: Yuk looks up at you guiltily before disgorging a piece of equipment.
You acquire an item: black sword
You gain 5 Strongness
You gain 17 Mysteriousness
You gain 7 Sarcasm

autoPutty: monster the black knight

Request 3 of 10 (Woods: Black Forest) in progress...

[7910] Black Forest
Encounter: The Black Knight
Strategy: D:\dloads\KoLMafia\ccs\test.ccs [black knight]
Round 0: slyz wins initiative!
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
****if hascombatitem 1965
********call mafiaround; use 1965
********goto mafiampexit
****endif
****if hascombatitem 345
********call mafiaround; use 345
********goto mafiampexit
****endif
****if hascombatitem 518
********call mafiaround; use 518
********goto mafiampexit
****endif
****abort "No MP restoratives!"
****mark mafiampexit
endsub#mafiamp
#mafiaheader
call mafiaround; use 3665
mark mafiafinal
call mafiaround; attack
goto mafiafinal

Round 1: slyz executes a macro!
Round 1: slyz uses the Spooky Putty sheet!
You acquire an item: Spooky Putty monster
Round 2: Yuk leaps on your opponent, sliming him for 35 damage. It's inspiring!
Round 2: the black knight takes 35 damage.
You gain 35 Mana Points
You lose 11 hit points
Round 2: slyz attacks!
Round 3: the black knight takes 334 damage.
Round 3: Yuk leaps on your opponent, sliming him for 37 damage. It's inspiring!
Round 3: the black knight takes 37 damage.
You gain 37 Mana Points
Round 3: slyz wins the fight!
You gain 373 Meat
After Battle: Yuk hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: black sword
You acquire an item: black shield
You acquire an item: black greaves
You gain 7 Muscleboundness
You gain 14 Wizardliness
You gain 8 Smarm
 
Last edited:

slyz

Developer
I think this due to CombatActionManager.getCombatAction(). Only autoSteal and autoEntangle are taken into account, but autoPutty, autoOlfact, autoSphereID and autoPotionID aren't.

EDIT: Woops, "special action" is returned, so those should work I guess.
 

holatuwol

Developer
I have no idea what could be going wrong, but I suspect that attempting to macrofy before you know what monster you're fighting could be causing problems (though I don't actually see KoLmafia submitting a macro in your log). Try r9125 and see if that fixes it?
 

slyz

Developer
I forgot to mention that macroDebug wasn't set to true in my first example (if I recall correctly).

Since there wasn't any pause between
Code:
[7902] Black Forest
Encounter: The Black Knight
Strategy: attack with weapon
Round 0: slyz wins initiative!
and the rest of the combat. I'm guessing that Mafia was attacking on the first page load.

With r9125:
Code:
> get battleAction

attack with weapon

> get autoOlfact

> set autoOlfact = monster the black knight

autoOlfact => monster the black knight

> get autoOlfact

monster the black knight

[8994] Black Forest
Encounter: The Black Knight
Strategy: attack with weapon
Round 0: slyz wins initiative!
Round 1: Yuk is looking a little thin.
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
****if hascombatitem 1965
********call mafiaround; use 1965
********goto mafiampexit
****endif
****if hascombatitem 345
********call mafiaround; use 345
********goto mafiampexit
****endif
****abort "No MP restoratives!"
****mark mafiampexit
endsub#mafiamp
#mafiaheader
while mpbelow 40
****call mafiamp
endwhile
if hasskill 19
****call mafiaround; skill 19
endif
mark mafiafinal
call mafiaround; attack
goto mafiafinal

Round 1: slyz executes a macro!
Round 1: slyz casts TRANSCENDENT OLFACTION!
You acquire an effect: On the Trail (duration: 40 Adventures)
Round 2: slyz attacks!
Round 3: the black knight takes 3053 damage.
Round 3: slyz wins the fight!
You gain 129 Meat
After Battle: Yuk hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: black sword
You acquire an item: black shield
You acquire an item: black greaves
You gain 12 Muscleboundness
You gain 29 Enchantedness
You gain 14 Cheek

This looks fixed, thanks!
 
Top