Machine Elf Abstractions

For script writing
Post Reply
User avatar
digitrev
Spy vs. Pie
Posts: 63
Joined: Tue Oct 07, 2014 8:01 pm

Machine Elf Abstractions

Post by digitrev » Sun Dec 06, 2015 8:31 am

A nice, simple script to automatically upgrade your thought, sensation, and action abstractions up to certainty, joy, and motion.

It only upgrades if you have at least 5 of the appropriate item.

Code: Select all

item[monster] abstractions;
abstractions[$monster[Perceiver of Sensations]] = $item[abstraction: thought];
abstractions[$monster[Performer of Actions]] = $item[abstraction: sensation];
abstractions[$monster[Thinker of Thoughts]] = $item[abstraction: action];

void abstract(int initround, monster foe, string pg){
	if ($monsters[Perceiver of Sensations, Performer of Actions, Thinker of Thoughts] contains foe){
		if (abstractions[foe].item_amount() > 5)
			throw_item(abstractions[foe]);
	}
}

void main(int initround, monster foe, string pg) {
	abstract(initround, foe, pg);
}
Save it as whatever you like, and add it to your CCS section.
Image

Post Reply