New Content - Implemented Protonic Accelerator

Bale

Minion
LoL! That didn't occur to me. I'll leave it as an exercise to whomever uses the code unless I find I'm having a problem.
 

Bale

Minion
New content!

Code:
New monster #1953 found in Manuel with name 'The ghost of Vanillica "Trashblossom" Gorton' image 'ghost_hippy.gif' attributes ='Atk: 32 Def: 28 HP: 32 Init: 30 E: spooky P: undead'

--------------------
9093	tie-dyed fannypack	555109706	tiedyefanny.gif	accessory	d	50
tie-dyed fannypack	0	Mys: 10
Item	tie-dyed fannypack	Spooky Damage: +2, Stench Damage: +2, Hot Damage: +2, Cold Damage: +2, Sleaze Damage: +2, Item Drop: +10, Single Equip
--------------------
 

Bale

Minion
Ran into some problems and upgraded my function.

Code:
void bustGhost() {
	item acc3;
	location ghostLocation = to_location(get_property("ghostLocation"));
	if(to_boolean(get_property("kingLiberated")) && ghostLocation != $location[none] && my_location() != ghostLocation) {
		switch(ghostLocation) {
		case $location[Inside the Palindome]:
			acc3 = equipped_item($slot[acc3]);
			equip($slot[acc3], $item[Talisman o' Namsilat]);
			break;
		case $location[The Skeleton Store]:
			if(get_property("questM23Meatsmith") == "unstarted") {
				visit_url("shop.php?whichshop=meatsmith&action=talk");
				run_choice(1);
			}
			break;
		case $location[The Overgrown Lot]:
			if(get_property("questM24Doc") == "unstarted") {
				visit_url("shop.php?whichshop=doc&action=talk");
				run_choice(1);
			}
			break;
		case $location[Madness Bakery]:
			if(get_property("questM25Armorer") == "unstarted") {
				visit_url("shop.php?whichshop=armory&action=talk");
				run_choice(1);
			}
			break;
		}
		adv1(ghostLocation, -1, "while hasskill Shoot Ghost; skill Shoot Ghost; endwhile; while hasskill Shoot Ghost; skill Shoot Ghost; endwhile; skill Trap Ghost;");
		if(acc3 != $item[none])
			equip($slot[acc3], acc3);
	}
}
 
Last edited:

Bale

Minion
Don't forget to switch familiars, if applicable. My Crimbo Shrub is good at killing stuff too quickly.

I thought about that. You're right. If the character is using a combat familiar, it should be removed. Fortunately mafia keeps track of which familiars do damage in combat! I think this is the final version. (The function is not so small and cute anymore.)

Code:
void bustGhost() {
	item acc3;
	familiar fam;
	location ghostLocation = to_location(get_property("ghostLocation"));
	if(to_boolean(get_property("kingLiberated")) && ghostLocation != $location[none] && my_location() != ghostLocation) {
		switch(ghostLocation) {
		case $location[Inside the Palindome]:
			acc3 = equipped_item($slot[acc3]);
			equip($slot[acc3], $item[Talisman o' Namsilat]);
			break;
		case $location[The Skeleton Store]:
			if(get_property("questM23Meatsmith") == "unstarted") {
				visit_url("shop.php?whichshop=meatsmith&action=talk");
				run_choice(1);
			}
			break;
		case $location[The Overgrown Lot]:
			if(get_property("questM24Doc") == "unstarted") {
				visit_url("shop.php?whichshop=doc&action=talk");
				run_choice(1);
			}
			break;
		case $location[Madness Bakery]:
			if(get_property("questM25Armorer") == "unstarted") {
				visit_url("shop.php?whichshop=armory&action=talk");
				run_choice(1);
			}
			break;
		}
		if(my_familiar().combat) {
			fam = my_familiar();
			use_familiar($familiar[none]);
		}
		adv1(ghostLocation, -1, "while hasskill Shoot Ghost; skill Shoot Ghost; endwhile; while hasskill Shoot Ghost; skill Shoot Ghost; endwhile; skill Trap Ghost;");
		if(acc3 != $item[none])
			equip($slot[acc3], acc3);
		if(fam != $familiar[none])
			use_familiar(fam);
	}
}
 
Last edited:

Veracity

Developer
Staff member
Huh. After paranormal activity was detected in the Cobb's Knob Treasury, I spent a couple of extra turns there.

Code:
[4630] Cobb's Knob Treasury
Encounter: infinite meat bug
Round 0: Veracity loses initiative!
Round 1: Veracity casts SAUCESTORM!
Round 2: infinite meat bug takes 58 damage.
Round 2: infinite meat bug takes 58 damage.
Round 2: Veracity wins the fight!
After Battle: Ignominious Uncguary surveys the scene from atop the throne and sighs.
After Battle: Hobo Grrl sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 62496 Meat
You acquire an item: incredibly dense meat gem
After Battle: You gain 5 Muscleboundness
After Battle: You gain 1 Wizardliness
After Battle: You gain 13 Cheek
I'm OK with that.
 

PeKaJe

Member
Kind of related to this IotM, I've found that the ghost fights do not start the wandering monster counter, even though they happen in adventure.php zones. I had digitized a monster, then immediately went to fight a pending ghost, then mined gold for 7 turns. There was no wanderer at this time, but 7 turns after this there was.
 

Darzil

Developer
I'm seeing the message appear on turn 1 (if a combat), then every 51 turns (or next combat if it isn't one).

So in my last run
Code:
Turn 1
Turn 53 (first combat after 52)
Turn 106 (first combat after 104)
Turn 157
Turn 210 (first combat after 208)
Turn 261
Turn 312
Turn 363
Turn 414
Turn 465
Turn 516
Turn 567
Turn 618
Turn 669
Turn 720
Turn 771
Turn 822
Turn 873
Turn 924
Turn 975
Turn 1026
Turn 1077
Turn 1128
Turn 1179
Turn 1230
Turn 1281
Turn 1332
Turn 1383
Turn 1434
Turn 1485
There were sprinklings of ghosts, free fights, free runaways etc in there, but no change in schedule.
 

Darzil

Developer
Accidentally used getTurnsPlayed() rather than getCurrentRun(). Shall I change, as I know CHIT at least has already used it ?
 

Darzil

Developer
Sometimes it seems that the quests are not resetting. Seems to happen with Pill Power active. Theory is that mafia isn't successfully parsing monsterName when Pill Power adds the coloring to ghosts.
 

heeheehee

Developer
Staff member
If my memory serves me correctly, pill power just adds an OCRS-style tag to the monsters ("blue", which is also used for one of the cold ones, I think).
 

lostcalpolydude

Developer
Staff member
Kind of related to this IotM, I've found that the ghost fights do not start the wandering monster counter, even though they happen in adventure.php zones. I had digitized a monster, then immediately went to fight a pending ghost, then mined gold for 7 turns. There was no wanderer at this time, but 7 turns after this there was.

17111. I tried testing plenty of different cases for properly setting and not setting the counter, but it's possible I missed something.

I also changed monster type handling internally some, which could make future monster properties easier to add.
 

lostcalpolydude

Developer
Staff member
If my memory serves me correctly, pill power just adds an OCRS-style tag to the monsters ("blue", which is also used for one of the cold ones, I think).

That is how it is added. The reason there's an issue here, and there wasn't in OCRS path, is that the monster's name doesn't have any modifier adjectives prepended.

17113 fixes the issue, though there is probably a better way of handling things. In particular, Pill Power currently makes mafia think that ghosts are cold-aligned (attack and defense).
 

Bale

Minion
We're probably spinning a new release soon, so do we agree that this item is fully implemented?

Other than the psychokentic energy blobs which are arguably part of a greater HP/MP Recovery revamp.
 

Bale

Minion
I'm probably not the only one who wants mafia to automatically bust ghosts when I'm in aftercore.
I think this is the final version. (The function is not so small and cute anymore.)

That was not the final version. I've had some more experience to find a bug (aborting if I'm adventuring with a goal) and a discover feature I need to add (making sure the pack is equipped before fighting a ghost) so I'm posting my latest final version.

Code:
void bustGhost() {
	item acc3;
	familiar fam;
	location ghostLocation = to_location(get_property("ghostLocation"));
	if(my_inebriety() <= inebriety_limit() && to_boolean(get_property("kingLiberated")) && ghostLocation != $location[none]) {
		switch(ghostLocation) {
		case $location[Inside the Palindome]:
			acc3 = equipped_item($slot[acc3]);
			equip($slot[acc3], $item[Talisman o' Namsilat]);
			break;
		case $location[The Skeleton Store]:
			if(get_property("questM23Meatsmith") == "unstarted") {
				visit_url("shop.php?whichshop=meatsmith&action=talk");
				run_choice(1);
			}
			break;
		case $location[The Overgrown Lot]:
			if(get_property("questM24Doc") == "unstarted") {
				visit_url("shop.php?whichshop=doc&action=talk");
				run_choice(1);
			}
			break;
		case $location[Madness Bakery]:
			if(get_property("questM25Armorer") == "unstarted") {
				visit_url("shop.php?whichshop=armory&action=talk");
				run_choice(1);
			}
			break;
		}
		item back;
		if(!have_equipped($item[protonic accelerator pack])) {
			back = equipped_item($slot[back]);
			equip($item[protonic accelerator pack]);
		}
		if(my_familiar().combat) {
			fam = my_familiar();
			use_familiar($familiar[none]);
		}
		(!adv1(ghostLocation, -1, "while hasskill Shoot Ghost; skill Shoot Ghost; if hasskill Trap Ghost; skill Trap Ghost; endif; endwhile;")); // Trap error condition in case I'm adventuring with goals
		if(acc3 != $item[none])
			equip($slot[acc3], acc3);
		if(fam != $familiar[none])
			use_familiar(fam);
		if(back != $item[none])
			equip(back);
	}
}
 
Last edited:
Top