// basin.txt
// Cell 0 - Effects of basin
// Cell 1 - modifier, defaults to 90

// effects
// 0 - bless
// 1 - haste
// 2 - shield
// 3 - essence armor
// 4 - regem
// 5 - protection aura
// 6 - invlum
// 7 - poison
// 8 - acid
// 9 - summon a group
// 10 - more energy
// 11 - less energy
// 12 - nothing
// 13 - heal
// 14 - experience
// 15 - cure death curse
// 16 - gives trinket
// 17 - increase stat

beginobjectscript;

variables;

short amount = 10;

body;

beginstate INIT_STATE;
	if (get_memory_cell(1) != 0)
		amount = get_memory_cell(1);
	break;

beginstate DEAD_STATE;

break;

beginstate START_STATE; 
break;

beginstate USE_STATE;
	print_str_color("Drink Water: You drink the water in the basin.",2);
	play_sound(22);
		run_sparkles_on_object(ME,1,1,1);
	
	if (get_memory_cell(0) == 0) {
		print_str_color("  You feel energized.",2);
		set_char_status(30000,0,amount);
		}
	if (get_memory_cell(0) == 1) {
		print_str_color("  Everything around you slows down.",2);
		set_char_status(30000,24,amount);
		}
	if (get_memory_cell(0) == 2) {
		print_str_color("  You feel much safer.",2);
		set_char_status(30000,8,amount);
		}
	if (get_memory_cell(0) == 3) {
		print_str_color("  Your skin becomes much tougher.",2);
		if (amount > 10)
			amount = 10;
		set_char_status(30000,11,-100);
		set_char_status(30000,12,amount);
		}
	if (get_memory_cell(0) == 4) {
		print_str_color("  Your skin begins to glow slightly.",2);
		set_char_status(30000,21,amount);
		}
	if (get_memory_cell(0) == 5) {
		print_str_color("  Your skin becomes as tough as lizard hide.",2);
		if (amount > 10)
			amount = 10;
		set_char_status(30000,13,amount);
		}
	if (get_memory_cell(0) == 6) {
		print_str_color("  You begin to feel indestructible.",2);

		set_char_status(30000,18,amount);
		}
	if (get_memory_cell(0) == 7) {
		print_str_color("  You feel sick to your stomach.",2);
		set_char_status(30000,2,amount);
		}
	if (get_memory_cell(0) == 8) {
		print_str_color("  The water turns to acid in your stomach.",2);
		set_char_status(30000,6,amount);
		}
	if (get_memory_cell(0) == 9) {
		print_str_color("A cloud of mist floats out of the basin. Then it",2);
		print_str_color("turns solid.",2);
		activate_hidden_group(amount);
		}
	if (get_memory_cell(0) == 10) {
		print_str_color("  Some of your magical energy is restored.",2);
		restore_energy_char(30000,amount);	
		}
	if (get_memory_cell(0) == 11) {
		print_str_color("  Some of your magical energy is drained.",2);
		restore_energy_char(30000,-1 * amount);	
		}
	if (get_memory_cell(0) == 12) {
		print_str_color("  As far as you can tell, nothing happens.",2);
		}
	if (get_memory_cell(0) == 13) {
		print_str_color("  Your wounds are healed.",2);
		heal_char(30000,amount);	
		}
	if (get_memory_cell(0) == 14) {
		print_str_color("  You feel strange. You gain new insight.",2);
		award_party_xp(100 * num_chars_in_group(0),average_level());	
		}
	if (get_memory_cell(0) == 15) {
		print_str_color("  You feel a powerful jolt of life force flowing into you.",2);
		status_nearby(-10,1,26,0);
		status_nearby(5,1,9,0);
		status_nearby(5,1,14,0);
		}
	if (get_memory_cell(0) == 16) {
		print_str_color("  The basin contains harmless (if murky) water.",2);
		print_str_color("  At the bottom, you find something!",2);
		reward_give(487);
		}
	if (get_memory_cell(0) == 17) {
		print_str_color("  The liquid in the basin is filled with power. You drain",2);
		print_str_color("  it and are energized!",2);
		alter_stat(30000,get_memory_cell(1),1);
		}
		
	kill_object(ME,0);
break;