code:
# #суперудары
!ALL SUPERB SETTINGS ARE HERE

!Roundhouse kick ['удар_с_разворота']
базовый_вред['удар_с_разворота'] = базовый_вред[$оружие]*2
$тип_вреда['удар_с_разворота'] = $тип_вреда[$оружие]
$суперудар_тип['удар_с_разворота'] = 'сильная'
$суперудар_название['удар_с_разворота'] = "Roundhouse Kick"
суперудар_длительность['удар_с_разворота'] = 2+сила
$суперудар_текст['удар_с_разворота'] = "You deal a powerful roundhouse kick."
$спецэффект_описание['удар_с_разворота'] = 'roundhouse kick'
$суперудар_условие_1['удар_с_разворота'] = 'нет'
$суперудар_условие_2['удар_с_разворота'] = 'нет'
$суперудар_условие_против['удар_с_разворота'] = 'отсутствует'
$спецэффект_суперудара['удар_с_разворота'] = {}

!Swift blow ['рассечение']
базовый_вред['рассечение'] = базовый_вред[$оружие]*2
$тип_вреда['рассечение'] = 'рубящий'
$суперудар_тип['рассечение'] = 'быстрая'
$суперудар_название['рассечение'] = "Swift Blow"
суперудар_длительность['рассечение'] = 2+ловкость
$суперудар_текст['рассечение'] = "Your swift blow damages two enemies at once."
$спецэффект_описание['рассечение'] = 'two targets'
$суперудар_условие_1['рассечение'] = 'рубящий'
$суперудар_условие_2['рассечение'] = 'нет'
$суперудар_условие_против['рассечение'] = 'отсутствует'

$спецэффект_суперудара['рассечение'] = {
	вторцель = 0
	:in_loop

	if вторцель < количество_врагов:
		вторцель += 1
		if вторцель ! текущий:
			if враг[вторцель] = 1: jump 'in_loop1'
		end
		jump 'in_loop'
	end
	:in_loop1

	atk = 0
	def = вторцель

	вред_на_рассчет = базовый_вред[$оружие]*2
	$атака = 'быстрая'

	gs 'рассчет_вреда'

	if $класс_врага[вторцель] = 'пешка':
		if модификатор > 0:
			$состояние[вторцель] = 'повержен'
			дух_игрока += 2
		end
	end

	if $класс_врага[вторцель] ! 'пешка':
		if $тип_нанесенного_вреда = 'психический':
			if тонкое_тело[$враг[вторцель]] = 1: здоровье_врага[вторцель] -= нанесенный_вред
			if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
			дух_игрока += нанесенный_вред/2
		end
		if $тип_нанесенного_вреда = 'дробящий':
			if хрупкий[$враг[вторцель]] = 1: здоровье_врага[вторцель] -= нанесенный_вред
			if безустали[$враг[вторцель]] = 0: выносливость_врага[вторцель] -= нанесенный_вред
			if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
			дух_игрока += нанесенный_вред/2
		end
		if бессмертный[$враг[текущий]] = 0: здоровье_врага[вторцель] -= нанесенный_вред
		if безустали[$враг[текущий]] = 0: выносливость_врага[вторцель] -= нанесенный_вред
		if бесстрашный[$враг[текущий]] = 0: дух_врага[вторцель] -= нанесенный_вред
		дух_игрока += нанесенный_вред/2 &! was нанесенный_вред[i]/2, bugfix? - ImperatorAugustus
	end
}

!Battle cry ['воинственный_клич']
базовый_вред['воинственный_клич'] = 10
$тип_вреда['воинственный_клич'] = 'психический'
$суперудар_тип['воинственный_клич'] = 'точная'
$суперудар_название['воинственный_клич'] = "Battle Cry"
суперудар_длительность['воинственный_клич'] = 2+восприятие
$суперудар_текст['воинственный_клич'] = "You shout a chilling roar, that inspires fear in the hearts of enemies and gives you a burst of energy."
$спецэффект_описание['воинственный_клич'] = 'psy attack'
$суперудар_условие_1['воинственный_клич'] = 'нет'
$суперудар_условие_2['воинственный_клич'] = 'нет'
$суперудар_условие_против['воинственный_клич'] = 'отсутствует'

$спецэффект_суперудара['воинственный_клич'] = {
	if бешенство < 4: бешенство = 4
	дух_игрока += 20
}

!Heavy blow ['оглушение']
базовый_вред['оглушение'] = базовый_вред[$оружие]*2
$тип_вреда['оглушение'] = 'дробящий'
$суперудар_тип['оглушение'] = 'сильная'
$суперудар_название['оглушение'] = "Heavy Blow"
суперудар_длительность['оглушение'] = 2+сила
$суперудар_текст['оглушение'] = "You put all your strength in a blow to the head of the enemy."
$спецэффект_описание['оглушение'] = 'stun'
$суперудар_условие_1['оглушение'] = 'дробящий'
$суперудар_условие_2['оглушение'] = 'нет'
$суперудар_условие_против['оглушение'] = 'отсутствует'
$спецэффект_суперудара['оглушение'] = {
	ошеломление[текущий] = 99
}

!Dashing blow ['подрезка']
базовый_вред['подрезка'] = базовый_вред[$оружие]*2
$тип_вреда['подрезка'] = 'рубящий'
$суперудар_тип['подрезка'] = 'точная'
$суперудар_название['подрезка'] = "Dashing Blow"
суперудар_длительность['подрезка'] = 2+ловкость
$суперудар_текст['подрезка'] = "You quickly cut the enemy's tendons, so now it will be hard for them to stay on their feet."
$спецэффект_описание['подрезка'] = 'cutting'
$суперудар_условие_1['подрезка'] = 'рубящий'
$суперудар_условие_2['подрезка'] = 'нет'
$суперудар_условие_против['подрезка'] = 'отсутствует'
$спецэффект_суперудара['подрезка'] = {
	шаткость[текущий] = 99
}

!Precise hit ['ослепление']
базовый_вред['ослепление'] = базовый_вред[$оружие]*3
$тип_вреда['ослепление'] = 'колющий'
$суперудар_тип['ослепление'] = 'точная'
$суперудар_название['ослепление'] = "Precise Hit"
суперудар_длительность['ослепление'] = 2+восприятие
$суперудар_текст['ослепление'] = "You hit precisely in the eyes to bring down the enemy as they are blinded."
$спецэффект_описание['ослепление'] = 'blinding'
$суперудар_условие_1['ослепление'] = 'колющий'
$суперудар_условие_2['ослепление'] = 'нет'
$суперудар_условие_против['ослепление'] = 'отсутствует'
$спецэффект_суперудара['ослепление'] = {
рассеянность[текущий] = 99
}

!Riposte ['ответный_удар']
базовый_вред['ответный_удар'] = базовый_вред[$оружие]*2
$тип_вреда['ответный_удар'] = 'колющий'
$суперудар_тип['ответный_удар'] = 'точная'
$суперудар_название['ответный_удар'] = "Riposte"
суперудар_длительность['ответный_удар'] = 2+восприятие
$суперудар_текст['ответный_удар'] = "You parry precisely as you make a quick piercing blow to the enemy's vitals."
$спецэффект_описание['ответный_удар'] = 'evasion and piercing'
$суперудар_условие_1['ответный_удар'] = 'колющий'
$суперудар_условие_2['ответный_удар'] = 'нет'
$суперудар_условие_против['ответный_удар'] = 'отсутствует'
$спецэффект_суперудара['ответный_удар'] = {
	if верткость < 4: верткость = 4
	здоровье_игрока += 10
}

!Face Bash ['лицо_прикладом']
базовый_вред['лицо_прикладом'] = базовый_вред[$оружие]*2
$тип_вреда['лицо_прикладом'] = 'дробящий'
$суперудар_тип['лицо_прикладом'] = 'сильная'
$суперудар_название['лицо_прикладом'] = "Face Bash"
суперудар_длительность['лицо_прикладом'] = 2+сила
$суперудар_текст[$суперудар[супер]] = "You fake a low attack and lower the enemy's defenses. You quickly and powerfully smash your blunt weapon forward into the enemy's face."
$спецэффект_описание['лицо_прикладом'] = 'power and weakness'
$суперудар_условие_1['лицо_прикладом'] = 'дробящий'
$суперудар_условие_2['лицо_прикладом'] = 'нет'
$суперудар_условие_против['лицо_прикладом'] = 'отсутствует'
$спецэффект_суперудара['лицо_прикладом'] = {
	слабость[текущий] = 99
}

!NOT USED, SO NO TRANSLATION YET, YES I AM A LAZY BASTARD
!ОГНЕННЫЙ ШАР ['огненный_шар']
базовый_вред['огненный_шар'] = базовый_вред[$оружие]*2
$тип_вреда['огненный_шар'] = 'огонь'
$суперудар_тип['огненный_шар'] = 'сильная'
$суперудар_название['огненный_шар'] = "Огненный шар"
суперудар_длительность['огненный_шар'] = 2+ловкость
$суперудар_текст['огненный_шар'] = "Мощный взрыв пламени накрывает все цели разом"
$спецэффект_описание['огненный_шар'] = 'по зоне'
$суперудар_условие_1['огненный_шар'] = 'большой_имплемент'
$суперудар_условие_2['огненный_шар'] = 'нет'
$суперудар_условие_против['огненный_шар'] = 'отсутствует'

$спецэффект_суперудара['огненный_шар'] = {
	вторцель = 0
	поражено = 1
	:in_loop

	if вторцель < количество_врагов:
		вторцель += 1
		if вторцель ! текущий:
			if враг[вторцель] = 1:
				поражено += 1
				jump 'in_loop1'
			end
		end
		jump 'in_loop'
	end
	:in_loop1

	atk = 0
	def = вторцель

	вред_на_рассчет = базовый_вред[$оружие]

	gs 'рассчет_вреда'

	if $класс_врага[вторцель] = 'пешка':
		if модификатор > 0:
			$состояние[вторцель] = 'повержен'
			дух_игрока += 2
		end
	end

	if $класс_врага[вторцель] ! 'пешка':
		if $тип_нанесенного_вреда = 'психический':
			if тонкое_тело[$враг[вторцель]] = 1: здоровье_врага[вторцель] -= нанесенный_вред
			if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
			дух_игрока += нанесенный_вред/2
			jump 'loop4'вторцель
		end
		if $тип_нанесенного_вреда = 'дробящий':
			if хрупкий[$враг[вторцель]] = 1: здоровье_врага[вторцель] -= нанесенный_вред
			if безустали[$враг[вторцель]] = 0: выносливость_врага[вторцель] -= нанесенный_вред
			if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
			дух_игрока += нанесенный_вред/2
			jump 'loop4'
		end
		if бессмертный[$враг[вторцель]] = 0: здоровье_врага[вторцель] -= нанесенный_вред
		if безустали[$враг[вторцель]] = 0: выносливость_врага[вторцель] -= нанесенный_вред
		if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
		дух_игрока += нанесенный_вред/2 &! was нанесенный_вред[i]/2, bugfix? - ImperatorAugustus
	end

	if поражено < количество_врагов - поверженные_враги: jump 'in_loop'
}

!ЦЕПЬ МОЛНИЙ ['цепь_молний']
базовый_вред['цепь_молний'] = базовый_вред[$оружие]*3
$тип_вреда['цепь_молний'] = 'молния'
$суперудар_тип['цепь_молний'] = 'точная'
$суперудар_название['цепь_молний'] = "Цепь молний"
суперудар_длительность['цепь_молний'] = 2+ловкость
$суперудар_текст['цепь_молний'] = "Молния бьет врага точно в грудь и разветвляется надвое"
$спецэффект_описание['цепь_молний'] = '+2 цели'
$суперудар_условие_1['цепь_молний'] = 'средний_имплемент'
$суперудар_условие_2['цепь_молний'] = 'нет'
$суперудар_условие_против['цепь_молний'] = 'отсутствует'

$спецэффект_суперудара['цепь_молний'] = {
	jump 'in_loop'
	:in_loop1

	atk = 0
	def = вторцель

	вред_на_рассчет = базовый_вред[$оружие]*2
	$атака = 'точная'

	gs 'рассчет_вреда'

	if $класс_врага[вторцель] = 'пешка':
		if модификатор > 0:
			$состояние[вторцель] = 'повержен'
			дух_игрока += 2
		end
	end

	if $класс_врага[вторцель] ! 'пешка':
		if $тип_нанесенного_вреда = 'психический':
			if тонкое_тело[$враг[вторцель]] = 1: здоровье_врага[вторцель] -= нанесенный_вред
			if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
			дух_игрока += нанесенный_вред/2
			jump 'loop4'вторцель
		end
		if $тип_нанесенного_вреда = 'дробящий':
			if хрупкий[$враг[вторцель]] = 1: здоровье_врага[вторцель] -= нанесенный_вред
			if безустали[$враг[вторцель]] = 0: выносливость_врага[вторцель] -= нанесенный_вред
			if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
			дух_игрока += нанесенный_вред/2
			jump 'loop4'
		end
		if бессмертный[$враг[вторцель]] = 0: здоровье_врага[вторцель] -= нанесенный_вред
		if безустали[$враг[вторцель]] = 0: выносливость_врага[вторцель] -= нанесенный_вред
		if бесстрашный[$враг[вторцель]] = 0: дух_врага[вторцель] -= нанесенный_вред
		дух_игрока += нанесенный_вред/2 &! was нанесенный_вред[i]/2, bugfix? - ImperatorAugustus
	end

	:in_loop
	вторцель = текущий+1
	if враг[вторцель] = 1:
		jump 'in_loop1'
	end
	вторцель = текущий-1
	if враг[вторцель] = 1:
		jump 'in_loop1'
	end
}

!ЗАМОРОЗКА ['заморозка']
базовый_вред['заморозка'] = базовый_вред[$оружие]*2
$тип_вреда['заморозка'] = 'холод'
$суперудар_тип['заморозка'] = 'быстрая'
$суперудар_название['заморозка'] = "Заморозка"
суперудар_длительность['заморозка'] = 2+восприятие
$суперудар_текст['заморозка'] = "Враг мгновенно покрывается толстой ледяной коркой"
$спецэффект_описание['заморозка'] = 'замедление'
$суперудар_условие_1['заморозка'] = 'малый_имплемент'
$суперудар_условие_2['заморозка'] = 'нет'
$суперудар_условие_против['заморозка'] = 'отсутствует'
$спецэффект_суперудара['заморозка'] = {
	скованность[текущий] = 99
}

!_________FOR GLADIATRIX________
!THROW A NET ['бросок_сети']
базовый_вред['бросок_сети'] = 5
$тип_вреда['бросок_сети'] = 'дробящий'
$суперудар_тип['бросок_сети'] = 'быстрая'
$суперудар_название['бросок_сети'] = "THROW NET"
суперудар_длительность['бросок_сети'] = 10+ловкость
$суперудар_текст['бросок_сети'] = "You throw your net at the enemy just in time. Now they are almost helpless!"
$спецэффект_описание['бросок_сети'] = 'entangled'
$суперудар_условие_1['бросок_сети'] = 'дробящий'
$суперудар_условие_2['бросок_сети'] = 'нет'
$суперудар_условие_против['бросок_сети'] = 'отсутствует'
$спецэффект_суперудара['бросок_сети'] = {
	скованность[текущий] = 8
	слабость[текущий] = 8
	рассеянность[текущий] = 8
}

!Serrated blade ['серейтор']
базовый_вред['серейтор'] = базовый_вред[$оружие]*2
$тип_вреда['серейтор'] = 'рубящий'
$суперудар_тип['серейтор'] = 'быстрая'
$суперудар_название['серейтор'] = "Serrated Blade"
суперудар_длительность['серейтор'] = 2+сила
$суперудар_текст['серейтор'] = "You cut your opponent with a whipsaw and pull it back, tearing flesh off your miserable enemy."
$спецэффект_описание['серейтор'] = 'terrible scar'
$суперудар_условие_1['серейтор'] = 'рубящий'
$суперудар_условие_2['серейтор'] = 'нет'
$суперудар_условие_против['серейтор'] = 'отсутствует'
$спецэффект_суперудара['серейтор'] = {
	боль[текущий] = 8
}

!SCISSORS ['ножницы']
базовый_вред['ножницы'] = базовый_вред[$оружие]*3
$тип_вреда['ножницы'] = 'рубящий'
$суперудар_тип['ножницы'] = 'быстрая'
$суперудар_название['ножницы'] = "Scissors"
суперудар_длительность['ножницы'] = 2+сила
$суперудар_текст['ножницы'] = "You cross your swords like a huge deadly scissors and hit your enemy with them."
$спецэффект_описание['ножницы'] = 'a lot of damage'
$суперудар_условие_1['ножницы'] = 'рубящий'
$суперудар_условие_2['ножницы'] = 'нет'
$суперудар_условие_против['ножницы'] = 'отсутствует'
$спецэффект_суперудара['ножницы'] = {}

!SHIELD BASH ['толчок_щитом']
базовый_вред['толчок_щитом'] = базовый_вред[$оружие]*2
$тип_вреда['толчок_щитом'] = 'дробящий'
$суперудар_тип['толчок_щитом'] = 'сильная'
$суперудар_название['толчок_щитом'] = "Shield Bash"
суперудар_длительность['толчок_щитом'] = 2+сила
$суперудар_текст['толчок_щитом'] = "You bash your enemy with a shield, causing them to falter."
$спецэффект_описание['толчок_щитом'] = 'knocked down'
$суперудар_условие_1['толчок_щитом'] = 'дробящий'
$суперудар_условие_2['толчок_щитом'] = 'нет'
$суперудар_условие_против['толчок_щитом'] = 'отсутствует'
$спецэффект_суперудара['толчок_щитом'] = {
	рассеянность[текущий] = 8
	ошеломление[текущий] = 8
}

--- #суперудары ---------------------------------

repo_name: Tcallas/game

license: unknown


code:
# #тексты_движка
!FIGHT ENGINE TEXT MESSAGES
!&nbsp used - simple space doesnt work with tags
$защита_описание['блок'] = "Block"
$защита_описание['контратака'] = "Counterattack"
$защита_описание['уклонение'] = "Evade"

$защита_врага_описание['блок'] = "Blocks"
$защита_врага_описание['контратака'] = "Counterattacks"
$защита_врага_описание['уклонение'] = "Evades"

$слабость_справка = "   Weakened character deals half damage with their power attacks."
$скованность_справка = "   Character experiencing stiffness will deal half damage with their speed attacks."
$боль_справка = "   Character is experiencing severe pain will inflict half damage with their precise attacks."
$шаткость_справка = "   Character that is not standing firmly on his feet gets double damage from power attacks."
$ошеломление_справка = "   Stunned character gets twice as much damage from speed attacks."
$рассеянность_справка = "   Distracted character will receive twice as much damage from precise attacks."
$бешенство_справка = "   Character experiences battle fury that doubles the damage of his power attacks."
$разгон_справка = "   Wisely using inertia for acceleration character does double damage with speed attacks."
$меткость_справка = "   Precise attacks of this character deal double damage."
$адреналин_справка = "   Adrenaline surge allows this character to ignore half the damage from power attacks."
$верткость_справка = "   Character dexterously evades from speed attacks, ignoring half of their damage."
$внимание_справка = "   Attentive character reflects precise attacks twice as successfully, receiving only half of their damage."

$хиты_справка = "   Red heart demonstrates vitality. 0 = death." + _
"   Green heart demonstrates stamina. 0 = loss of consciousness." + _
"   Purple heart demonstrates morale. 0 = retreat." + _
"   You can click on each heart for more information."

$блок_справка = "&nbsp&nbsp&nbspPower attack will pierce this defense, inflicting double damage." + _
"   Precise attack will give the attacker a favorable condition." + _
"   Speed attack will inflict a negative state on a blocking person." + _
"   You can press the arrow below your portrait to change your defense."
$контратака_справка = "&nbsp&nbsp&nbspPrecise attack will pierce this defense, inflicting double damage." + _
"   Power attack will inflict a negative state on a blocking person." + _
"   Speed attack will give the attacker a favorable condition." + _
"   You can press the arrow below your portrait to change your defense."
$уклонение_справка = "&nbsp&nbsp&nbspSpeed attack will pierce this defense, inflicting double damage." + _
"   Precise attack will inflict a negative state on a blocking person." + _
"   Power attack will give the attacker a favorable condition." + _
"   You can press the arrow below your portrait to change your defense."

$живучесть_справка = "   Red heart shows the value of vitality. Loss of vitality leads to wounds and traumas. If the value reaches zero, the character dies. Different weapons affect different hearts, offset by armor; attack color is irrelevant."
$выносливость_справка = "   Green heart shows the value of stamina. Loss of stamina may result in bruising and reduced energy after battle. If stamina reaches zero, the character falls unconscious, but is alive. Different weapons affect different hearts, offset by armor; attack color is irrelevant."
$боевой_дух_справка = "   Purple heart shows the scale of morale. Half of the damage dealt to an opponent each round is added to morale. Loss of morale does not hold long-term consequences. When morale drops to zero, the character will surrender or run away from the battlefield. Different weapons affect different hearts, offset by armor; attack color is irrelevant."

--- #тексты_движка ---------------------------------


code:
# $addon
!Updates changed databases cleans up old variables
if $args[0] = 'update':
	if $args[1] = 'full':
		!Reload databases
		gs 'interior_storage'
		gs 'refresh_database'
		gs 'interior_restore'

		!title fix
		if $game_ver ! $title_fix:
			if $game_ver ! '':
				msg '
Game updated
from
(<<$game_ver>>)
to
(<<$title_fix>>)'
			else
				msg '
Game updated
to
(<<$title_fix>>)'
			end
			$game_ver = $title_fix
		end
	end
end

if $args[0] = 'no_rate_stat_tooltip_text':
	if args[2] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[3] = -1, 5, 0)]>>"
	elseif args[2] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[3] = -1, 4, 1)]>>"
	elseif args[2] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[3] = -1, 3, 2)]>>"
	elseif args[2] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[3] = -1, 2, 3)]>>"
	elseif args[2] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[3] = -1, 1, 4)]>>"
	elseif args[2] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[3] = -1, 0, 5)]>>"
	elseif args[2] = 6:
		$result = "<<$atr_name[$args[1]]>> S++"
	end
end

if $args[0] = 'no_rate_full_grade_tooltip_text':
	if args[2] = -5:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 10, 0)]>>"
	elseif args[2] = -4:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 9,  1)]>>"
	elseif args[2] = -3:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 8,  2)]>>"
	elseif args[2] = -2:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 7,  3)]>>"
	elseif args[2] = -1:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 6,  4)]>>"
	elseif args[2] = 0:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 5,  5)]>>"
	elseif args[2] = 1:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 4,  6)]>>"
	elseif args[2] = 2:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 3,  7)]>>"
	elseif args[2] = 3:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 2,  8)]>>"
	elseif args[2] = 4:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 1,  9)]>>"
	elseif args[2] = 5:
		$result = "<<$atr_name[$args[1]]>><<$full_grade[IIF(args[3] = -1, 0,  10)]>>"
	end
end

if $args[0] = 'no_label_stat_rate_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if slave[$args[1]] = 0:
		$result = "<<slave_rate[$args[1]]>> (+10/-10)"
	elseif slave[$args[1]] = 1:
		$result = "<<slave_rate[$args[1]]>> (+20/-10)"
	elseif slave[$args[1]] = 2:
		$result = "<<slave_rate[$args[1]]>> (+40/-10)"
	elseif slave[$args[1]] = 3:
		$result = "<<slave_rate[$args[1]]>> (+80/-20)"
	elseif slave[$args[1]] = 4:
		$result = "<<slave_rate[$args[1]]>> (+160/-40)"
	elseif slave[$args[1]] = 5:
		$result = "<<slave_rate[$args[1]]>> (+10/-80)"
	end
end

! used in auspex_list
if $args[0] = 'assistant_no_label_stat_rate_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if assistant[$args[1]] = 0:
		$result = "<<assistant_rate[$args[1]]>> (+10/-10)"
	elseif assistant[$args[1]] = 1:
		$result = "<<assistant_rate[$args[1]]>> (+20/-10)"
	elseif assistant[$args[1]] = 2:
		$result = "<<assistant_rate[$args[1]]>> (+40/-10)"
	elseif assistant[$args[1]] = 3:
		$result = "<<assistant_rate[$args[1]]>> (+80/-20)"
	elseif assistant[$args[1]] = 4:
		$result = "<<assistant_rate[$args[1]]>> (+160/-40)"
	elseif assistant[$args[1]] = 5:
		$result = "<<assistant_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'physique_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if slave[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<slave_rate[$args[1]]>> (+10/-10)"
	elseif slave[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[5]>>; <<slave_rate[$args[1]]>> (+20/-10)"
	elseif slave[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[4]>>; <<slave_rate[$args[1]]>> (+40/-10)"
	elseif slave[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[3]>>; <<slave_rate[$args[1]]>> (+80/-20)"
	elseif slave[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[2]>>; <<slave_rate[$args[1]]>> (+160/-40)"
	elseif slave[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<slave_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'assistant_physique_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if assistant[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<assistant_rate[$args[1]]>> (+10/-10)"
	elseif assistant[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[5]>>; <<assistant_rate[$args[1]]>> (+20/-10)"
	elseif assistant[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[4]>>; <<assistant_rate[$args[1]]>> (+40/-10)"
	elseif assistant[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[3]>>; <<assistant_rate[$args[1]]>> (+80/-20)"
	elseif assistant[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[2]>>; <<assistant_rate[$args[1]]>> (+160/-40)"
	elseif assistant[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<assistant_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'prisoner_physique_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if prisoner[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<prisoner_rate[$args[1]]>> (+10/-10)"
	elseif prisoner[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[5]>>; <<prisoner_rate[$args[1]]>> (+20/-10)"
	elseif prisoner[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[4]>>; <<prisoner_rate[$args[1]]>> (+40/-10)"
	elseif prisoner[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[3]>>; <<prisoner_rate[$args[1]]>> (+80/-20)"
	elseif prisoner[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[2]>>; <<prisoner_rate[$args[1]]>> (+160/-40)"
	elseif prisoner[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<prisoner_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'cow_physique_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if cow[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<cow_rate[$args[1]]>> (+10/-10)"
	elseif cow[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[5]>>; <<cow_rate[$args[1]]>> (+20/-10)"
	elseif cow[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[4]>>; <<cow_rate[$args[1]]>> (+40/-10)"
	elseif cow[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[3]>>; <<cow_rate[$args[1]]>> (+80/-20)"
	elseif cow[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[2]>>; <<cow_rate[$args[1]]>> (+160/-40)"
	elseif cow[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[0]>>; <<cow_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'stat_tooltip_text':
	!updated ranges to match #static_base - ImperatorAugustus
	if slave[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 5, 0)]>>; <<slave_rate[$args[1]]>> (+10/-10)"
	elseif slave[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 4, 1)]>>; <<slave_rate[$args[1]]>> (+20/-10)"
	elseif slave[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 3, 2)]>>; <<slave_rate[$args[1]]>> (+40/-10)"
	elseif slave[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 2, 3)]>>; <<slave_rate[$args[1]]>> (+80/-20)"
	elseif slave[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 1, 4)]>>; <<slave_rate[$args[1]]>> (+160/-40)"
	elseif slave[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 0, 5)]>>; <<slave_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'assistant_stat_tooltip_text':
	!bugfix: was checking slave stats instead of assistant - ImperatorAugustus
	if assistant[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 5, 0)]>>; <<assistant_rate[$args[1]]>> (+10/-10)"
	elseif assistant[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 4, 1)]>>; <<assistant_rate[$args[1]]>> (+20/-10)"
	elseif assistant[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 3, 2)]>>; <<assistant_rate[$args[1]]>> (+40/-10)"
	elseif assistant[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 2, 3)]>>; <<assistant_rate[$args[1]]>> (+80/-20)"
	elseif assistant[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 1, 4)]>>; <<assistant_rate[$args[1]]>> (+160/-40)"
	elseif assistant[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 0, 5)]>>; <<assistant_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'cow_stat_tooltip_text':
	!bugfix: was checking slave stats instead of cow - ImperatorAugustus
	if cow[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 5, 0)]>>; <<cow_rate[$args[1]]>> (+10/-10)"
	elseif cow[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 4, 1)]>>; <<cow_rate[$args[1]]>> (+20/-10)"
	elseif cow[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 3, 2)]>>; <<cow_rate[$args[1]]>> (+40/-10)"
	elseif cow[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 2, 3)]>>; <<cow_rate[$args[1]]>> (+80/-20)"
	elseif cow[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 1, 4)]>>; <<cow_rate[$args[1]]>> (+160/-40)"
	elseif cow[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 0, 5)]>>; <<cow_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'stock_stat_tooltip_text':
	!bugfix: was checking slave stats instead of stock - ImperatorAugustus
	if stock[$args[1]] = 0:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 5, 0)]>>; <<stock_rate[$args[1]]>> (+10/-10)"
	elseif stock[$args[1]] = 1:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 4, 1)]>>; <<stock_rate[$args[1]]>> (+20/-10)"
	elseif stock[$args[1]] = 2:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 3, 2)]>>; <<stock_rate[$args[1]]>> (+40/-10)"
	elseif stock[$args[1]] = 3:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 2, 3)]>>; <<stock_rate[$args[1]]>> (+80/-20)"
	elseif stock[$args[1]] = 4:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 1, 4)]>>; <<stock_rate[$args[1]]>> (+160/-40)"
	elseif stock[$args[1]] = 5:
		$result = "<<$atr_name[$args[1]]>><<$skill_grade[IIF(args[2] = -1, 0, 5)]>>; <<stock_rate[$args[1]]>> (+10/-80)"
	end
end

if $args[0] = 'info_box':
	$info_box[0] = "content\pic\buttons\info_0.png"
	$info_box[1] = "content\pic\buttons\info_1.png"
	$info_box[2] = "content\pic\buttons\info_2.png"
	$info_box[3] = "content\pic\buttons\info_3.png"
	$info_box[4] = "content\pic\buttons\info_4.png"
	$info_box[5] = "content\pic\buttons\info_5.png"

	$info_box_p[0] = "content\pic\buttons\info_5.png"
	$info_box_p[1] = "content\pic\buttons\info_4.png"
	$info_box_p[2] = "content\pic\buttons\info_3.png"
	$info_box_p[3] = "content\pic\buttons\info_2.png"
	$info_box_p[4] = "content\pic\buttons\info_1.png"
	$info_box_p[5] = "content\pic\buttons\info_0.png"

	$info_box_f[0] = "content\pic\buttons\info_3.png"
	$info_box_f[1] = "content\pic\buttons\info_5.png"
	$info_box_f[2] = "content\pic\buttons\info_4.png"
	$info_box_f[3] = "content\pic\buttons\info_2.png"
	$info_box_f[4] = "content\pic\buttons\info_1.png"
	$info_box_f[5] = "content\pic\buttons\info_0.png"
end

if $args[0] = 'menu_form' or $args[0] = 'city_menu_form' and args[1] ! 0 and args[2] ! 0:

!lillimerge, might want to rename this as Cheat Mode, for clarity
	$setting_display += {

{ { { Wizard Mode } } }

}
	if wizard_mode ! 1:
	 	$setting_display += '

Off

<a href = ''EXEC: wizard_mode = 1 & gt "<<$args[0]>>"''>

'
	else
	 	$setting_display += '

On

<a href = ''EXEC: wizard_mode = 0 & gt "<<$args[0]>>"''>

'
	end

!lillimerge, not sure what the use of the turning on and off debug mode is
	$setting_display += {

{ { { Debug } } }

}
	if debug ! 1:
	 	$setting_display += '

Off

<a href = ''EXEC: debug = 1 & gt "<<$args[0]>>"''>

'
	else
	 	$setting_display += '

On

<a href = ''EXEC: debug = 0 & gt "<<$args[0]>>"''>

'
	end

	if $args[0] = 'city_menu_form':
		$setting_display_c += '

Back

<a href = ''EXEC: city_form = <<args[2]>> & gt "<<$args[0]>>"''>

'
		if args[3] ! 0:
			$setting_display_c2 += '

Next

<a href = ''EXEC: city_form = <<args[3]>> & gt "<<$args[0]>>"''>

'
		else
			$setting_display_c2 += {

 Next

}
		end
	else
		$setting_display_c += '

Back

<a href = ''EXEC: <<$args[0]>> = <<args[2]>> & gt "<<$args[0]>>"''>

'
		if args[3] ! 0:
			$setting_display_c2 += '

Next

<a href = ''EXEC: <<$args[0]>> = <<args[3]>> & gt "<<$args[0]>>"''>

'
		else
			$setting_display_c2 += {

 Next

}
		end
	end
end

--- $addon ---------------------------------


code:
# $addon_custom_data
!called from main_menu, Start, and slave_stat

if $args[0] = 'toggle':
	if use_custom_data ! 1:
		inclib 'jack_custom.qsp'
		gs '#custom_slave_base'
		gs 'custom_slave_id'
		freelib
		gs '$addon_custom_data', 'update_active'
		use_custom_data = 1
	else
		use_custom_data = 0
		gs '$addon_custom_data', 'purge_slave_base'
		gs '$addon', 'update', 'full'
		gs '$addon_custom_data', 'update_active'
		gs '$addon_custom_data'
	end
end

if $args[0] = 'update_active':

	if assistant_state = CONST_INT['slave_exist'] and assistant_type > 0:
		gs '$addon_custom_data', 'update_current', 'assistant'
	end
	if slave_state = CONST_INT['slave_exist'] and slave_type > 0:
		gs '$addon_custom_data', 'update_current', 'slave'
	end
	if prisoner_state = CONST_INT['slave_exist'] and prisoner_type > 0:
		gs '$addon_custom_data', 'update_current', 'prisoner'
	end
	if iced_1_state = CONST_INT['slave_exist'] and iced_1_type > 0:
		gs '$addon_custom_data', 'update_current', 'iced_1'
	end
	if iced_2_state = CONST_INT['slave_exist'] and iced_2_type > 0:
		gs '$addon_custom_data', 'update_current', 'iced_2'
	end
	if iced_3_state = CONST_INT['slave_exist'] and iced_3_type > 0:
		gs '$addon_custom_data', 'update_current', 'iced_3'
	end
	if iced_4_state = CONST_INT['slave_exist'] and iced_4_type > 0:
		gs '$addon_custom_data', 'update_current', 'iced_4'
	end
	if iced_5_state = CONST_INT['slave_exist'] and iced_5_type > 0:
		gs '$addon_custom_data', 'update_current', 'iced_5'
	end
	if iced_6_state = CONST_INT['slave_exist'] and iced_6_type > 0:
		gs '$addon_custom_data', 'update_current', 'iced_6'
	end
	if cow_state = CONST_INT['slave_exist'] and cow_type > 0:
		gs '$addon_custom_data', 'update_current', 'cow'
	end
	if farmhand_state = CONST_INT['slave_exist'] and farmhand_type > 0:
		gs '$addon_custom_data', 'update_current', 'farmhand'
	end
	if harpy_state = CONST_INT['slave_exist'] and harpy_type > 0:
		gs '$addon_custom_data', 'update_current', 'harpy'
	end
	if pig_state = CONST_INT['slave_exist'] and pig_type > 0:
		gs '$addon_custom_data', 'update_current', 'pig'
	end
	! checks for cow, farmhand, harpy, pig were incorrect (e.g., cow_state > 0 instead of cow_type) - ImperatorAugustus

end

if $args[0] = 'update_current':

	killvar 'temp_current'
	killvar 'temp_type'

	if $args[1] = 'assistant':
		temp_type = assistant_type
		if $seed_name[temp_type] ! '': $assistant_name = $seed_name[temp_type]
		copyarr 'temp_current','assistant'
		copyarr '$temp_current','$assistant'
	end
	if $args[1] = 'slave':
		temp_type = slave_type
		if $seed_name[temp_type] ! '': $slave_name = $seed_name[temp_type]
		copyarr 'temp_current','slave'
		copyarr '$temp_current','$slave'
	end
	if $args[1] = 'prisoner':
		temp_type = prisoner_type
		if $seed_name[temp_type] ! '': $prisoner_name = $seed_name[temp_type]
		copyarr 'temp_current','prisoner'
		copyarr '$temp_current','$prisoner'
	end
	if $args[1] = 'iced_1':
		temp_type = iced_1_type
		if $seed_name[temp_type] ! '': $iced_1_name = $seed_name[temp_type]
		copyarr 'temp_current','iced_1'
		copyarr '$temp_current','$iced_1'
	end
	if $args[1] = 'iced_2':
		temp_type = iced_2_type
		if $seed_name[temp_type] ! '': $iced_2_name = $seed_name[temp_type]
		copyarr 'temp_current','iced_2'
		copyarr '$temp_current','$iced_2'
	end
	if $args[1] = 'iced_3':
		temp_type = iced_3_type
		if $seed_name[temp_type] ! '': $iced_3_name = $seed_name[temp_type]
		copyarr 'temp_current','iced_3'
		copyarr '$temp_current','$iced_3'
	end
	if $args[1] = 'iced_4':
		temp_type = iced_4_type
		if $seed_name[temp_type] ! '': $iced_4_name = $seed_name[temp_type]
		copyarr 'temp_current','iced_4'
		copyarr '$temp_current','$iced_4'
	end
	if $args[1] = 'iced_5':
		temp_type = iced_5_type
		if $seed_name[temp_type] ! '': $iced_5_name = $seed_name[temp_type]
		copyarr 'temp_current','iced_5'
		copyarr '$temp_current','$iced_5'
	end
	if $args[1] = 'iced_6':
		temp_type = iced_6_type
		if $seed_name[temp_type] ! '': $iced_6_name = $seed_name[temp_type]
		copyarr 'temp_current','iced_6'
		copyarr '$temp_current','$iced_6'
	end
	if $args[1] = 'cow':
		temp_type = cow_type
		if $seed_name[temp_type] ! '': $cow_name = $seed_name[temp_type]
		copyarr 'temp_current','cow'
		copyarr '$temp_current','$cow'
	end
	if $args[1] = 'farmhand':
		temp_type = farmhand_type
		if $seed_name[temp_type] ! '': $farmhand_name = $seed_name[temp_type]
		copyarr 'temp_current','farmhand'
		copyarr '$temp_current','$farmhand'
	end
	if $args[1] = 'harpy':
		temp_type = harpy_type
		if $seed_name[temp_type] ! '': $harpy_name = $seed_name[temp_type]
		copyarr 'temp_current','harpy'
		copyarr '$temp_current','$harpy'
	end
	if $args[1] = 'pig':
		temp_type = pig_type
		if $seed_name[temp_type] ! '': $pig_name = $seed_name[temp_type]
		copyarr 'temp_current','pig'
		copyarr '$temp_current','$pig'
	end

	temp_current["age"] = seed_age[temp_type]

	if temp_current["age"] = CONST_INT['loli_age']: temp_current['fertility'] = -2

	temp_current["boobs"] = seed_boobs[temp_type]
	$temp_current['boobs_img'] = $seed_boobs_img[temp_type]
	$temp_current['pussy_img'] = $seed_pussy_img[temp_type]

	$temp_current['fullimage'] = $fullimage[temp_type]
	$temp_current['ava'] = $seed_ava[temp_type]
	$temp_current['ava_gray'] = $seed_ava_gray[temp_type]
	$temp_current['ava_clear'] = $seed_ava_clear[temp_type]

	if $args[1] = 'assistant':
		copyarr 'assistant', 'temp_current'
		copyarr '$assistant', '$temp_current'
	end
	if $args[1] = 'slave':
		copyarr 'slave', 'temp_current'
		copyarr '$slave', '$temp_current'
	end
	if $args[1] = 'prisoner':
		copyarr 'prisoner', 'temp_current'
		copyarr '$prisoner', '$temp_current'
	end
	if $args[1] = 'iced_1':
		copyarr 'iced_1', 'temp_current'
		copyarr '$iced_1', '$temp_current'
	end
	if $args[1] = 'iced_2':
		copyarr 'iced_2', 'temp_current'
		copyarr '$iced_2', '$temp_current'
	end
	if $args[1] = 'iced_3':
		copyarr 'iced_3', 'temp_current'
		copyarr '$iced_3', '$temp_current'
	end
	if $args[1] = 'iced_4':
		copyarr 'iced_4', 'temp_current'
		copyarr '$iced_4', '$temp_current'
	end
	if $args[1] = 'iced_5':
		copyarr 'iced_5', 'temp_current'
		copyarr '$iced_5', '$temp_current'
	end
	if $args[1] = 'iced_6':
		copyarr 'iced_6', 'temp_current'
		copyarr '$iced_6', '$temp_current'
	end
	if $args[1] = 'cow':
		copyarr 'cow', 'temp_current'
		copyarr '$cow', '$temp_current'
	end
	if $args[1] = 'farmhand':
		copyarr 'farmhand', 'temp_current'
		copyarr '$farmhand', '$temp_current'
	end
	if $args[1] = 'harpy':
		copyarr 'harpy', 'temp_current'
		copyarr '$harpy', '$temp_current'
	end
	if $args[1] = 'pig':
		copyarr 'pig', 'temp_current'
		copyarr '$pig', '$temp_current'
	end

	killvar 'temp_current'
	killvar 'temp_type'

end

if $args[0] = 'purge_slave_base':

	killvar '$fullimage'
	killvar '$fullmade'
	killvar '$fullmistress'
	killvar '$fullsecretary'
	killvar '$seed_ava'
	killvar '$seed_ava_gray'
	killvar '$seed_ava_clear'
	killvar 'seed_age'
	killvar 'seed_boobs'
	killvar '$seed_boobs_img'
	killvar '$seed_pussy_img'
	killvar '$seed_psy_basic'
	killvar '$seed_world'
	killvar 'seed_hair'
	killvar '$bathing_alone'
	killvar '$percussion'
	killvar '$cleaning'
	killvar '$cooking'
	killvar '$dance'
	killvar '$desertag'
	killvar '$enchanting'
	killvar '$fighting'
	killvar '$woodwind'
	killvar '$strings'
	killvar '$gymnastics'
	killvar '$lesbo_bath'
	killvar '$nurse'
	killvar '$piano'
	killvar '$rest'
	killvar '$secretary'
	killvar '$student'
	killvar '$painting'
	killvar '$singing'
	killvar '$washing'
	killvar '$analfisting'
	killvar '$analsex'
	killvar '$bondage'
	killvar '$bdsm'
	killvar '$bj'
	killvar '$bukkake'
	killvar '$cowSK'
	killvar '$disgrace'
	killvar '$defloration'
	killvar '$deprivation_suit'
	killvar '$dog_sex'
	killvar '$dildo'
	killvar '$dt'
	killvar '$enema'
	killvar '$exhibit'
	killvar '$fisting'
	killvar '$fj'
	killvar '$gangbang'
	killvar '$hj'
	killvar '$horse_sex'
	killvar '$hug'
	killvar '$kiss'
	killvar '$kopro'
	killvar '$kuni'
	killvar '$lesbian'
	killvar '$masturbation'
	killvar '$paizuri'
	killvar '$petplay'
	killvar '$petting'
	killvar '$pig_sex'
	killvar '$ponyplay'
	killvar '$rimming'
	killvar '$seduce'
	killvar '$sex_vaginal'
	killvar '$spider'
	killvar '$tongue'
	killvar '$tentacles'
	killvar '$spider'
	killvar '$urine_drink'
	killvar '$branding'
	killvar '$cane'
	killvar '$ear_grab'
	killvar '$ironmaiden'
	killvar '$fireswing'
	killvar '$fist_hit'
	killvar '$leash'
	killvar '$needle'
	killvar '$pins'
	killvar '$slap'
	killvar '$spank'
	killvar '$strappado'
	killvar '$verminpit'
	killvar '$water'
	killvar '$wax'
	killvar '$woodenhorse'
	killvar '$whip'
	killvar '$impregnation'
	killvar '$milking'

end

if $args[0] = 'menu_form' or $args[0] = 'city_menu_form' and args[1] ! 0 and args[2] ! 0:

	$setting_display += {

{ { { USE CUSTOM DATA } } }

}
	if use_custom_data ! 1:
		$setting_display += '

No

<a href = ''EXEC: gs "$addon_custom_data", "toggle" & gt "<<$args[0]>>"''>

'
	else
		$setting_display += '

Yes

<a href = ''EXEC: gs "$addon_custom_data", "toggle" & gt "<<$args[0]>>"''>

'
	end

	if loli_last < 199: $setting_display_r += '

{ Unused IDs for immature: <<loli_last+1>> - 199 }

<a href = ''EXEC: temp_slave_id = INPUT ("Input slave ID (1 - <<loli_last>>)!") & if temp_slave_id > 0 and temp_slave_id <= loli_last: gs "$addon_custom_data", "display_slave_id", temp_slave_id, "<<$args[0]>>", <<args[1]>>''>

'
	if young_last < 499: $setting_display_r += '

{ Unused IDs for young: <<young_last+1>> - 499 }

<a href = ''EXEC: temp_slave_id = INPUT ("Input slave ID (201 - <<young_last>>)!") & if temp_slave_id > 200 and temp_slave_id <= young_last: gs "$addon_custom_data", "display_slave_id", temp_slave_id, "<<$args[0]>>", <<args[1]>>''>

'
	if milf_last < 699: $setting_display_r += '

{ Unused IDs for milf: <<milf_last+1>> - 699 }

<a href = ''EXEC: temp_slave_id = INPUT ("Input slave ID (501 - <<milf_last>>)!") & if temp_slave_id > 500 and temp_slave_id <= milf_last: gs "$addon_custom_data", "display_slave_id", temp_slave_id, "<<$args[0]>>", <<args[1]>>''>

'
	killvar 'temp_slave_id'

	if $args[0] = 'city_menu_form':
		$setting_display_c += '

Back

<a href = ''EXEC: city_form = <<args[2]>> & gt "<<$args[0]>>"''>

'
		if args[3] ! 0:
			$setting_display_c2 += '

Next

<a href = ''EXEC: city_form = <<args[3]>> & gt "<<$args[0]>>"''>

'
		else
			$setting_display_c2 += {

 Next

}
		end
	else
		$setting_display_c += '

Back

<a href = ''EXEC: <<$args[0]>> = <<args[2]>> & gt "<<$args[0]>>"''>

'
		if args[3] ! 0:
			$setting_display_c2 += '

Next

<a href = ''EXEC: <<$args[0]>> = <<args[3]>> & gt "<<$args[0]>>"''>

'
		else
			$setting_display_c2 += {

 Next

}
		end
	end

end

if $args[0] = 'display_slave_id':

	cls
	gs '_layout'
	*p '
<img src="content\pic\<<$fullimage[args[1]]>>.png">
'
	if $args[4] ! '':
		*p '
<a href = "EXEC: <<$args[2]>> = <<args[3]>> & gt ''<<$args[4]>>''">
'
	else
		*p '
<a href = "EXEC: <<$args[2]>> = <<args[3]>> & gt ''<<$args[2]>>''">
'
	end

end

--- $addon_custom_data ---------------------------------


code:
# $appropriate_buyers_list
!Draw up a list of the best customers for the current slave
gs '$slave_price'
$appropriate_buyers_list = ''
$appropriate_buyers_list_2 = ''
$appropriate_buyers_list_3 = ''

n = arrsize('$basic_buyer') - 1
i = 0
z = 0
:loop
i += 1

if rating >= demand_rating[$basic_buyer[i]] and slave_specialisation[$interesting_specialisation[$basic_buyer[i]]] > 0 and npc_progress[$basic_buyer[i]] < 2:
 	if z < 15:
		$appropriate_buyers_list += '
<<$diary_mark[$basic_buyer[i]]>>

'
		z += 1
  	elseif z < 34:
		$appropriate_buyers_list_2 += '
<<$diary_mark[$basic_buyer[i]]>>

'
		z += 1
	elseif z < 55:
		$appropriate_buyers_list_3 += '
<<$diary_mark[$basic_buyer[i]]>>

'
		z += 1
 	end
end

if i < n: jump 'loop'

if $appropriate_buyers_list = '' and $appropriate_buyers_list_2 = '' and $appropriate_buyers_list_3 = '': $appropriate_buyers_list = '
  It is unlikely that I will find a suitable buyer for my slave. She has a lot to learn.
'

if buyers_list = 0:
	$quest_description[2] = '<<$appropriate_buyers_list>>
Back'
	if z > 15: $quest_description[2] = '<<$appropriate_buyers_list>>
Back&nbsp→'
elseif buyers_list = 1:
	$quest_description[2] = '<<$appropriate_buyers_list_2>>
Back&nbsp←'
	if z > 34: $quest_description[2] = '<<$appropriate_buyers_list_2>>
Back&nbsp←&nbsp→'
elseif buyers_list = 2:
	$quest_description[2] = '<<$appropriate_buyers_list_3>>
Back&nbsp←'
end

--- $appropriate_buyers_list ---------------------------------


code:
# $calculate_attributes
!NOW FOR MASTER ONLY (SLAVES ARE UPDATED SEPARATELY FROM $NEWLOC) - ImperatorAugustus
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
*nl
!Calculate rate stats and increases
!Overhauled by crushboss
!Converted to dynamic - ImperatorAugustus

!Master Characteristic Increases and Skillups - New System - crushboss

!Set Master Rates when slaver is first created - crushboss, rewritten by i107760
if master_check = 0:
	if master_str = 1 and master_str_rate < master_str_rate_cap[0]: master_str_rate = master_str_rate_cap[0]
	if master_str = 2 and master_str_rate < master_str_rate_cap[1]: master_str_rate = master_str_rate_cap[1]
	if master_str = 3 and master_str_rate < master_str_rate_cap[2]: master_str_rate = master_str_rate_cap[2]
	if master_str = 4 and master_str_rate < master_str_rate_cap[3]: master_str_rate = master_str_rate_cap[3]
	if master_str = 5 and master_str_rate < master_str_rate_cap[4]: master_str_rate = master_str_rate_cap[4]

	if master_cha = 1 and master_cha_rate < master_cha_rate_cap[0]: master_cha_rate = master_cha_rate_cap[0]
	if master_cha = 2 and master_cha_rate < master_cha_rate_cap[1]: master_cha_rate = master_cha_rate_cap[1]
	if master_cha = 3 and master_cha_rate < master_cha_rate_cap[2]: master_cha_rate = master_cha_rate_cap[2]
	if master_cha = 4 and master_cha_rate < master_cha_rate_cap[3]: master_cha_rate = master_cha_rate_cap[3]
	if master_cha = 5 and master_cha_rate < master_cha_rate_cap[4]: master_cha_rate = master_cha_rate_cap[4]

	if master_libido = 1 and master_libido_rate < master_libido_rate_cap[0]: master_libido_rate = master_libido_rate_cap[0]
	if master_libido = 2 and master_libido_rate < master_libido_rate_cap[1]: master_libido_rate = master_libido_rate_cap[1]
	if master_libido = 3 and master_libido_rate < master_libido_rate_cap[2]: master_libido_rate = master_libido_rate_cap[2]
	if master_libido = 4 and master_libido_rate < master_libido_rate_cap[3]: master_libido_rate = master_libido_rate_cap[3]
	if master_libido = 5 and master_libido_rate < master_libido_rate_cap[4]: master_libido_rate = master_libido_rate_cap[4]

	if master_excitement = 1 and master_excitement_rate < 15: master_excitement_rate = 15
	if master_excitement = 2 and master_excitement_rate < 30: master_excitement_rate = 30
	if master_excitement = 3 and master_excitement_rate < 60: master_excitement_rate = 60
	if master_excitement = 4 and master_excitement_rate < 100: master_excitement_rate = 100
	if master_excitement = 5 and master_excitement_rate < 180: master_excitement_rate = 180

	if master_tutor = 1 and master_tutor_rate < master_tutor_rate_cap[0]: master_tutor_rate = master_tutor_rate_cap[0]
	if master_tutor = 2 and master_tutor_rate < master_tutor_rate_cap[1]: master_tutor_rate = master_tutor_rate_cap[1]
	if master_tutor = 3 and master_tutor_rate < master_tutor_rate_cap[2]: master_tutor_rate = master_tutor_rate_cap[2]
	if master_tutor = 4 and master_tutor_rate < master_tutor_rate_cap[3]: master_tutor_rate = master_tutor_rate_cap[3]
	if master_tutor = 5 and master_tutor_rate < master_tutor_rate_cap[4]: master_tutor_rate = master_tutor_rate_cap[4]

	if master_butler = 1 and master_butler_rate < master_butler_rate_cap[0]: master_butler_rate = master_butler_rate_cap[0]
	if master_butler = 2 and master_butler_rate < master_butler_rate_cap[1]: master_butler_rate = master_butler_rate_cap[1]
	if master_butler = 3 and master_butler_rate < master_butler_rate_cap[2]: master_butler_rate = master_butler_rate_cap[2]
	if master_butler = 4 and master_butler_rate < master_butler_rate_cap[3]: master_butler_rate = master_butler_rate_cap[3]
	if master_butler = 5 and master_butler_rate < master_butler_rate_cap[4]: master_butler_rate = master_butler_rate_cap[4]

	if master_artdirector = 1 and master_artdirector_rate < master_artdirector_rate_cap[0]: master_artdirector_rate = master_artdirector_rate_cap[0]
	if master_artdirector = 2 and master_artdirector_rate < master_artdirector_rate_cap[1]: master_artdirector_rate = master_artdirector_rate_cap[1]
	if master_artdirector = 3 and master_artdirector_rate < master_artdirector_rate_cap[2]: master_artdirector_rate = master_artdirector_rate_cap[2]
	if master_artdirector = 4 and master_artdirector_rate < master_artdirector_rate_cap[3]: master_artdirector_rate = master_artdirector_rate_cap[3]
	if master_artdirector = 5 and master_artdirector_rate < master_artdirector_rate_cap[4]: master_artdirector_rate = master_artdirector_rate_cap[4]

	if master_medic = 1 and master_medic_rate < master_medic_rate_cap[0]: master_medic_rate = master_medic_rate_cap[0]
	if master_medic = 2 and master_medic_rate < master_medic_rate_cap[1]: master_medic_rate = master_medic_rate_cap[1]
	if master_medic = 3 and master_medic_rate < master_medic_rate_cap[2]: master_medic_rate = master_medic_rate_cap[2]
	if master_medic = 4 and master_medic_rate < master_medic_rate_cap[3]: master_medic_rate = master_medic_rate_cap[3]
	if master_medic = 5 and master_medic_rate < master_medic_rate_cap[4]: master_medic_rate = master_medic_rate_cap[4]

	if master_fighter = 1 and master_fighter_rate < master_fighter_rate_cap[0]: master_fighter_rate = master_fighter_rate_cap[0]
	if master_fighter = 2 and master_fighter_rate < master_fighter_rate_cap[1]: master_fighter_rate = master_fighter_rate_cap[1]
	if master_fighter = 3 and master_fighter_rate < master_fighter_rate_cap[2]: master_fighter_rate = master_fighter_rate_cap[2]
	if master_fighter = 4 and master_fighter_rate < master_fighter_rate_cap[3]: master_fighter_rate = master_fighter_rate_cap[3]
	if master_fighter = 5 and master_fighter_rate < master_fighter_rate_cap[4]: master_fighter_rate = master_fighter_rate_cap[4]

	if master_mage = 1 and master_mage_rate < master_mage_rate_cap[0]: master_mage_rate = master_mage_rate_cap[0]
	if master_mage = 2 and master_mage_rate < master_mage_rate_cap[1]: master_mage_rate = master_mage_rate_cap[1]
	if master_mage = 3 and master_mage_rate < master_mage_rate_cap[2]: master_mage_rate = master_mage_rate_cap[2]
	if master_mage = 4 and master_mage_rate < master_mage_rate_cap[3]: master_mage_rate = master_mage_rate_cap[3]
	if master_mage = 5 and master_mage_rate < master_mage_rate_cap[4]: master_mage_rate = master_mage_rate_cap[4]

	if master_domination = 1 and master_domination_rate < master_domination_rate_cap[0]: master_domination_rate = master_domination_rate_cap[0]
	if master_domination = 2 and master_domination_rate < master_domination_rate_cap[1]: master_domination_rate = master_domination_rate_cap[1]
	if master_domination = 3 and master_domination_rate < master_domination_rate_cap[2]: master_domination_rate = master_domination_rate_cap[2]
	if master_domination = 4 and master_domination_rate < master_domination_rate_cap[3]: master_domination_rate = master_domination_rate_cap[3]
	if master_domination = 5 and master_domination_rate < master_domination_rate_cap[4]: master_domination_rate = master_domination_rate_cap[4]

	if master_flagelation = 1 and master_flagelation_rate < master_flagelation_rate_cap[0]: master_flagelation_rate = master_flagelation_rate_cap[0]
	if master_flagelation = 2 and master_flagelation_rate < master_flagelation_rate_cap[1]: master_flagelation_rate = master_flagelation_rate_cap[1]
	if master_flagelation = 3 and master_flagelation_rate < master_flagelation_rate_cap[2]: master_flagelation_rate = master_flagelation_rate_cap[2]
	if master_flagelation = 4 and master_flagelation_rate < master_flagelation_rate_cap[3]: master_flagelation_rate = master_flagelation_rate_cap[3]
	if master_flagelation = 5 and master_flagelation_rate < master_flagelation_rate_cap[4]: master_flagelation_rate = master_flagelation_rate_cap[4]

	if master_torture = 1 and master_torture_rate < master_torture_rate_cap[0]: master_torture_rate = master_torture_rate_cap[0]
	if master_torture = 2 and master_torture_rate < master_torture_rate_cap[1]: master_torture_rate = master_torture_rate_cap[1]
	if master_torture = 3 and master_torture_rate < master_torture_rate_cap[2]: master_torture_rate = master_torture_rate_cap[2]
	if master_torture = 4 and master_torture_rate < master_torture_rate_cap[3]: master_torture_rate = master_torture_rate_cap[3]
	if master_torture = 5 and master_torture_rate < master_torture_rate_cap[4]: master_torture_rate = master_torture_rate_cap[4]

	if master_bondage = 1 and master_bondage_rate < master_bondage_rate_cap[0]: master_bondage_rate = master_bondage_rate_cap[0]
	if master_bondage = 2 and master_bondage_rate < master_bondage_rate_cap[1]: master_bondage_rate = master_bondage_rate_cap[1]
	if master_bondage = 3 and master_bondage_rate < master_bondage_rate_cap[2]: master_bondage_rate = master_bondage_rate_cap[2]
	if master_bondage = 4 and master_bondage_rate < master_bondage_rate_cap[3]: master_bondage_rate = master_bondage_rate_cap[3]
	if master_bondage = 5 and master_bondage_rate < master_bondage_rate_cap[4]: master_bondage_rate = master_bondage_rate_cap[4]

	if master_petting = 1 and master_petting_rate < master_petting_rate_cap[0]: master_petting_rate = master_petting_rate_cap[0]
	if master_petting = 2 and master_petting_rate < master_petting_rate_cap[1]: master_petting_rate = master_petting_rate_cap[1]
	if master_petting = 3 and master_petting_rate < master_petting_rate_cap[2]: master_petting_rate = master_petting_rate_cap[2]
	if master_petting = 4 and master_petting_rate < master_petting_rate_cap[3]: master_petting_rate = master_petting_rate_cap[3]
	if master_petting = 5 and master_petting_rate < master_petting_rate_cap[4]: master_petting_rate = master_petting_rate_cap[4]

	if master_oral = 1 and master_oral_rate < master_oral_rate_cap[0]: master_oral_rate = master_oral_rate_cap[0]
	if master_oral = 2 and master_oral_rate < master_oral_rate_cap[1]: master_oral_rate = master_oral_rate_cap[1]
	if master_oral = 3 and master_oral_rate < master_oral_rate_cap[2]: master_oral_rate = master_oral_rate_cap[2]
	if master_oral = 4 and master_oral_rate < master_oral_rate_cap[3]: master_oral_rate = master_oral_rate_cap[3]
	if master_oral = 5 and master_oral_rate < master_oral_rate_cap[4]: master_oral_rate = master_oral_rate_cap[4]

	if master_penetration = 1 and master_penetration_rate < master_penetration_rate_cap[0]: master_penetration_rate = master_penetration_rate_cap[0]
	if master_penetration = 2 and master_penetration_rate < master_penetration_rate_cap[1]: master_penetration_rate = master_penetration_rate_cap[1]
	if master_penetration = 3 and master_penetration_rate < master_penetration_rate_cap[2]: master_penetration_rate = master_penetration_rate_cap[2]
	if master_penetration = 4 and master_penetration_rate < master_penetration_rate_cap[3]: master_penetration_rate = master_penetration_rate_cap[3]
	if master_penetration = 5 and master_penetration_rate < master_penetration_rate_cap[4]: master_penetration_rate = master_penetration_rate_cap[4]

	if master_fetish = 1 and master_fetish_rate < master_fetish_rate_cap[0]: master_fetish_rate = master_fetish_rate_cap[0]
	if master_fetish = 2 and master_fetish_rate < master_fetish_rate_cap[1]: master_fetish_rate = master_fetish_rate_cap[1]
	if master_fetish = 3 and master_fetish_rate < master_fetish_rate_cap[2]: master_fetish_rate = master_fetish_rate_cap[2]
	if master_fetish = 4 and master_fetish_rate < master_fetish_rate_cap[3]: master_fetish_rate = master_fetish_rate_cap[3]
	if master_fetish = 5 and master_fetish_rate < master_fetish_rate_cap[4]: master_fetish_rate = master_fetish_rate_cap[4]
	master_check = 1
end

!Calculate all of master stats based on rate - crushboss, rewritten by i107760
master_wounds = 0
if master_wounds_rate >= master_wounds_rate_cap[0]: master_wounds = 1
if master_wounds_rate >= master_wounds_rate_cap[1]: master_wounds = 2
if master_wounds_rate >= master_wounds_rate_cap[2]: master_wounds = 3
if master_wounds_rate >= master_wounds_rate_cap[3]: master_wounds = 4
if master_wounds_rate >= master_wounds_rate_cap[4]: master_wounds = 5

master_str = 0
if master_str_rate >= master_str_rate_cap[0]: master_str = 1
if master_str_rate >= master_str_rate_cap[1]: master_str = 2
if master_str_rate >= master_str_rate_cap[2]: master_str = 3
if master_str_rate >= master_str_rate_cap[3]: master_str = 4
if master_str_rate >= master_str_rate_cap[4]: master_str = 5

master_cha = 0
if master_cha_rate >= master_cha_rate_cap[0]: master_cha = 1
if master_cha_rate >= master_cha_rate_cap[1]: master_cha = 2
if master_cha_rate >= master_cha_rate_cap[2]: master_cha = 3
if master_cha_rate >= master_cha_rate_cap[3]: master_cha = 4
if master_cha_rate >= master_cha_rate_cap[4]: master_cha = 5

! Uncle Tom impotence challenge (is_perv > 1) blocks libido increases until conditions are met
if is_perv ! 0 and no_loli ! 1:
	if is_perv = 3:
		master_libido_rate = 2 & master_excitement_rate = min(master_excitement_rate, -60)
	elseif is_perv = 2:
		master_libido_rate = min(master_libido_rate, master_libido_rate_cap[1] - 5) & master_excitement_rate = min(master_excitement_rate, 16)
	elseif master_perv_rate <= 40:
		master_libido_rate = min(master_libido_rate,master_libido_rate_cap[0])
	elseif master_perv_rate <= 160:
		master_libido_rate = min(master_libido_rate,master_libido_rate_cap[1])
	elseif master_perv_rate <= 400:
		master_libido_rate = min(master_libido_rate,master_libido_rate_cap[2])
	elseif master_perv_rate <= 700:
		master_libido_rate = min(master_libido_rate,master_libido_rate_cap[3])
	end
end

if is_perv ! 0 and one_time_virgin_bonus = 0 and slave['virginity'] > 1 and was_virgin = 1:
	one_time_virgin_bonus = 1
	master_perv_rate += 20
	if is_perv = 3: is_perv = 2
	if loli_magic = 0: loli_magic = 1
	master_mood_rate += 16
	if master_excitement_rate < 16: master_excitement_rate = 16
	libido_msg = max(libido_msg,1) &! at least level 1
	master_libido_rate = max(master_libido_rate, master_libido_rate_cap[0]) &! at least level 1
	msg '   Taking this<<$little_txt>> girl’s natural virginity is the most ' + dyneval($vb_cycle, 1, 'arousing') +' thing that has happened to you in decades. Or maybe ever. It seems the diversions that the Eternal Rome affords you may be just the thing for a dirty old man’s flagging libido! Maybe more perversions will empower you even more.'
elseif is_perv ! 0 and slave['virginity'] > 1 and was_virgin = 1:
	master_perv_rate += 20
	master_mood_rate += 16
	if master_excitement_rate < 16: master_excitement_rate = 16
elseif is_perv ! 0 and libido_msg < master_libido:
	$tmp = ''
	if no_loli = 2: $tmp = 'It seems the more little girls you molest, the hornier you get!'
	libido_msg = master_libido
	$libido_msg[1] =  'You are feeling more ' + dyneval($vb_cycle, 1, 'interested') +  ' in sex than you used to be. The Eternal Rome agrees with you.'
	$libido_msg[2] =  'You are feeling quite ' + dyneval($vb_cycle, 2, 'lustful') +  ', these days. Things are perking up in the libido department. <<$tmp>>'
	$libido_msg[3] =  'This made you feel quite ' + dyneval($vb_cycle, 3, 'libidinous') + '. Pretty good for dirty old man. <<$tmp>>'
	$libido_msg[4] =  'You are feeling wonderfully ' + dyneval($vb_cycle, 4, 'lubricious') + '. <<$tmp>>'
	$libido_msg[5] =  'Remember when you used to have erectile problems? Ha! Now, you are a ' + dyneval($vb_cycle, 5, 'salacious') + ' old goat' + IIF(no_loli = 2, ', always ready for the next little girl!', '!')
	msg '   <<$libido_msg[master_libido]>>'
	$tmp = ''
end
was_virgin = 0 &! reset flag

master_libido = 0
if master_libido_rate >= master_libido_rate_cap[0]: master_libido = 1
if master_libido_rate >= master_libido_rate_cap[1]: master_libido = 2
if master_libido_rate >= master_libido_rate_cap[2]: master_libido = 3
if master_libido_rate >= master_libido_rate_cap[3]: master_libido = 4
if master_libido_rate >= master_libido_rate_cap[4]: master_libido = 5

master_excitement = 0
if master_excitement_rate < 15: master_excitement = 0
if master_excitement_rate <= -15: master_excitement = -1
if master_excitement_rate <= -30: master_excitement = -2
if master_excitement_rate <= -60: master_excitement = -3
if master_excitement_rate <= -100: master_excitement = -4
if master_excitement_rate <= -180: master_excitement = -5
if master_excitement_rate >= 15: master_excitement = 1
if master_excitement_rate >= 30: master_excitement = 2
if master_excitement_rate >= 60: master_excitement = 3
if master_excitement_rate >= 100: master_excitement = 4
if master_excitement_rate >= 180: master_excitement = 5

brand_reputation = 0
if brand_rate >= brand_rate_cap[0]: brand_reputation = 1
if brand_rate >= brand_rate_cap[1]: brand_reputation = 2
if brand_rate >= brand_rate_cap[2]: brand_reputation = 3
if brand_rate >= brand_rate_cap[3]: brand_reputation = 4
if brand_rate >= brand_rate_cap[4]: brand_reputation = 5

guild_reputation = 0
if guild_reputation_rate >= guild_reputation_rate_cap[0]: guild_reputation = 1
if guild_reputation_rate >= guild_reputation_rate_cap[1]: guild_reputation = 2
if guild_reputation_rate >= guild_reputation_rate_cap[2]: guild_reputation = 3
if guild_reputation_rate >= guild_reputation_rate_cap[3]: guild_reputation = 4
if guild_reputation_rate >= guild_reputation_rate_cap[4]: guild_reputation = 5

master_hygiene = 0
if master_hygiene_rate >= master_hygiene_rate_cap[0]: master_hygiene = 1
if master_hygiene_rate >= master_hygiene_rate_cap[1]: master_hygiene = 2
if master_hygiene_rate >= master_hygiene_rate_cap[2]: master_hygiene = 3
if master_hygiene_rate >= master_hygiene_rate_cap[3]: master_hygiene = 4
if master_hygiene_rate >= master_hygiene_rate_cap[4]: master_hygiene = 5

master_tutor = 0
if master_tutor_rate >= master_tutor_rate_cap[0]: master_tutor = 1
if master_tutor_rate >= master_tutor_rate_cap[1]: master_tutor = 2
if master_tutor_rate >= master_tutor_rate_cap[2]: master_tutor = 3
if master_tutor_rate >= master_tutor_rate_cap[3]: master_tutor = 4
if master_tutor_rate >= master_tutor_rate_cap[4]: master_tutor = 5

master_butler = 0
if master_butler_rate >= master_butler_rate_cap[0]: master_butler = 1
if master_butler_rate >= master_butler_rate_cap[1]: master_butler = 2
if master_butler_rate >= master_butler_rate_cap[2]: master_butler = 3
if master_butler_rate >= master_butler_rate_cap[3]: master_butler = 4
if master_butler_rate >= master_butler_rate_cap[4]: master_butler = 5

master_artdirector = 0
if master_artdirector_rate >= master_artdirector_rate_cap[0]: master_artdirector = 1
if master_artdirector_rate >= master_artdirector_rate_cap[1]: master_artdirector = 2
if master_artdirector_rate >= master_artdirector_rate_cap[2]: master_artdirector = 3
if master_artdirector_rate >= master_artdirector_rate_cap[3]: master_artdirector = 4
if master_artdirector_rate >= master_artdirector_rate_cap[4]: master_artdirector = 5

master_medic = 0
if master_medic_rate >= master_medic_rate_cap[0]: master_medic = 1
if master_medic_rate >= master_medic_rate_cap[1]: master_medic = 2
if master_medic_rate >= master_medic_rate_cap[2]: master_medic = 3
if master_medic_rate >= master_medic_rate_cap[3]: master_medic = 4
if master_medic_rate >= master_medic_rate_cap[4]: master_medic = 5

!Fog trophies give one-time xp once master skill without bonuses reaches 4 (A+) - ImperatorAugustus
!There are 14 trophies in total and fighting xp is no longer given for sparring or non-unique Fog battles at A+
!So to reach S+ all of the trophies must be obtained, or other sources of xp must be used to supplement progress
!Currently the only other source of xp is personally teaching gladiatrix lessons, which gives master +1 per lesson
!Note it is currently impossible to obtain all trophies before reaching A+ skill because Fog battles give 5-15 xp each
if (master_fighter - boost_up['master_fighter']) = 4:
	if trophy_youngfiend  = 1: trophy_youngfiend  = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_maturefiend = 1: trophy_maturefiend = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_hugefiend   = 1: trophy_hugefiend   = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_blackmedic  = 1: trophy_blackmedic  = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_paladin     = 1: trophy_paladin     = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_beastmen    = 1: trophy_beastmen    = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_werewolf    = 1: trophy_werewolf    = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_vampire     = 1: trophy_vampire     = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_lich        = 1: trophy_lich        = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_scum        = 1: trophy_scum        = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_ogre        = 1: trophy_ogre        = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_goblins     = 1: trophy_goblins     = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_warg        = 1: trophy_warg        = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
	if trophy_orc         = 1: trophy_orc         = 2 & master_fighter_rate += 1 + master_fighter_rate_cap[4]/14
end

master_fighter = 0
if master_fighter_rate >= master_fighter_rate_cap[0]: master_fighter = 1
if master_fighter_rate >= master_fighter_rate_cap[1]: master_fighter = 2
if master_fighter_rate >= master_fighter_rate_cap[2]: master_fighter = 3
if master_fighter_rate >= master_fighter_rate_cap[3]: master_fighter = 4
if master_fighter_rate >= master_fighter_rate_cap[4]: master_fighter = 5

master_mage = 0
if master_mage_rate >= master_mage_rate_cap[0]: master_mage = 1
if master_mage_rate >= master_mage_rate_cap[1]: master_mage = 2
if master_mage_rate >= master_mage_rate_cap[2]: master_mage = 3
if master_mage_rate >= master_mage_rate_cap[3]: master_mage = 4
if master_mage_rate >= master_mage_rate_cap[4]: master_mage = 5

master_domination = 0
if master_domination_rate >= master_domination_rate_cap[0]: master_domination = 1
if master_domination_rate >= master_domination_rate_cap[1]: master_domination = 2
if master_domination_rate >= master_domination_rate_cap[2]: master_domination = 3
if master_domination_rate >= master_domination_rate_cap[3]: master_domination = 4
if master_domination_rate >= master_domination_rate_cap[4]: master_domination = 5

master_flagelation = 0
if master_flagelation_rate >= master_flagelation_rate_cap[0]: master_flagelation = 1
if master_flagelation_rate >= master_flagelation_rate_cap[1]: master_flagelation = 2
if master_flagelation_rate >= master_flagelation_rate_cap[2]: master_flagelation = 3
if master_flagelation_rate >= master_flagelation_rate_cap[3]: master_flagelation = 4
if master_flagelation_rate >= master_flagelation_rate_cap[4]: master_flagelation = 5

master_torture = 0
if master_torture_rate >= master_torture_rate_cap[0]: master_torture = 1
if master_torture_rate >= master_torture_rate_cap[1]: master_torture = 2
if master_torture_rate >= master_torture_rate_cap[2]: master_torture = 3
if master_torture_rate >= master_torture_rate_cap[3]: master_torture = 4
if master_torture_rate >= master_torture_rate_cap[4]: master_torture = 5

master_bondage = 0
if master_bondage_rate >= master_bondage_rate_cap[0]: master_bondage = 1
if master_bondage_rate >= master_bondage_rate_cap[1]: master_bondage = 2
if master_bondage_rate >= master_bondage_rate_cap[2]: master_bondage = 3
if master_bondage_rate >= master_bondage_rate_cap[3]: master_bondage = 4
if master_bondage_rate >= master_bondage_rate_cap[4]: master_bondage = 5

master_petting = 0
if master_petting_rate >= master_petting_rate_cap[0]: master_petting = 1
if master_petting_rate >= master_petting_rate_cap[1]: master_petting = 2
if master_petting_rate >= master_petting_rate_cap[2]: master_petting = 3
if master_petting_rate >= master_petting_rate_cap[3]: master_petting = 4
if master_petting_rate >= master_petting_rate_cap[4]: master_petting = 5

master_oral = 0
if master_oral_rate >= master_oral_rate_cap[0]: master_oral = 1
if master_oral_rate >= master_oral_rate_cap[1]: master_oral = 2
if master_oral_rate >= master_oral_rate_cap[2]: master_oral = 3
if master_oral_rate >= master_oral_rate_cap[3]: master_oral = 4
if master_oral_rate >= master_oral_rate_cap[4]: master_oral = 5

master_penetration = 0
if master_penetration_rate >= master_penetration_rate_cap[0]: master_penetration = 1
if master_penetration_rate >= master_penetration_rate_cap[1]: master_penetration = 2
if master_penetration_rate >= master_penetration_rate_cap[2]: master_penetration = 3
if master_penetration_rate >= master_penetration_rate_cap[3]: master_penetration = 4
if master_penetration_rate >= master_penetration_rate_cap[4]: master_penetration = 5

master_fetish = 0
if master_fetish_rate >= master_fetish_rate_cap[0]: master_fetish = 1
if master_fetish_rate >= master_fetish_rate_cap[1]: master_fetish = 2
if master_fetish_rate >= master_fetish_rate_cap[2]: master_fetish = 3
if master_fetish_rate >= master_fetish_rate_cap[3]: master_fetish = 4
if master_fetish_rate >= master_fetish_rate_cap[4]: master_fetish = 5

!Counting master cloth characteristic boosts - crushboss
killvar 'boost_up'
dynamic $item_property[$master_cloth]

if boost_up['master_artdirector'] = 1:
	master_artdirector += 1
end

if boost_up['master_fighter'] = 1:
	master_fighter += 1
end

if boost_up['master_butler'] = 1:
	master_butler += 1
end

if boost_up['master_medic'] = 1:
	master_medic += 1
end

if boost_up['master_mage'] = 1:
	master_mage += 1
end

!Characteristic Alignment for Master - crushboss
if master_hygiene_rate < 0: master_hygiene_rate = 0
if master_excitement_rate < -200: master_excitement_rate = -200
if master_excitement_rate > 200: master_excitement_rate = 200
if master_str > 5: master_str = 5
if master_str < 0: master_str = 0
if master_str_rate < 0: master_str_rate = 0
if master_cha > 5: master_cha = 5
if master_cha < 0: master_cha = 0
if master_cha_rate < 0: master_cha_rate = 0
if master_libido > 5: master_libido = 5
if master_libido < 0: master_libido = 0
if master_libido_rate <= 1: master_libido_rate = 2
if master_domination > 5: master_domination = 5
if master_domination < 0: master_domination = 0
if master_domination_rate < 0: master_domination_rate = 0

if master_tutor > 5: master_tutor = 5
if master_tutor < 0: master_tutor = 0
if master_tutor_rate < 0: master_tutor_rate = 0
if master_fighter > 6: master_fighter = 6
if master_fighter < 0: master_fighter = 0
if master_fighter_rate < 0: master_fighter_rate = 0
if master_butler > 6: master_butler = 6
if master_butler < 0: master_butler = 0
if master_butler_rate < 0: master_butler_rate = 0
if master_artdirector > 6: master_artdirector = 6
if master_artdirector < 0: master_artdirector = 0
if master_artdirector_rate < 0: master_artdirector_rate = 0
if master_medic > 6: master_medic = 6
if master_medic < 0: master_medic = 0
if master_medic_rate < 0: master_medic_rate = 0
if master_mage > 6: master_mage = 6
if master_mage < 0: master_mage = 0
if master_mage_rate < 0: master_mage_rate = 0
if master_torture > 5: master_torture = 5
if master_torture < 0: master_torture = 0
if master_torture_rate < 0: master_torture_rate = 0
if master_bondage > 5: master_bondage = 5
if master_bondage < 0: master_bondage = 0
if master_bondage_rate < 0: master_bondage_rate = 0
if master_flagelation > 5: master_flagelation = 5
if master_flagelation < 0: master_flagelation = 0
if master_flagelation_rate < 0: master_flagelation_rate = 0
if master_petting > 5: master_petting = 5
if master_petting < 0: master_petting = 0
if master_petting_rate < 0: master_petting_rate = 0
if master_oral > 5: master_oral = 5
if master_oral < 0: master_oral = 0
if master_oral_rate < 0: master_oral_rate = 0
if master_penetration > 5: master_penetration = 5
if master_penetration < 0: master_penetration = 0
if master_penetration_rate < 0: master_penetration_rate = 0
if master_fetish > 5: master_fetish = 5
if master_fetish < 0: master_fetish = 0
if master_fetish_rate < 0: master_fetish_rate = 0

if master_ill < 0: master_ill = 0
if master_ill > 6: master_ill = 6
if master_issues < 0: master_issues = 0
if master_issues > 5: master_issues = 5
if master_wounds > 5: master_wounds = 5
if master_wounds_rate < 0: master_wounds_rate = 0

if code_defined['update_master_energy_stars'] = 0:
	code_defined['update_master_energy_stars'] = 1 &! do-once

	$update_master_energy_stars = {
		$master_energy_stars = ''
		if master_half_action < 0 and master_energy < 5:
			master_energy += (-1 * master_half_action) / 2
			master_half_action = master_half_action MOD 2 - max(0, master_energy - 5)*2
			master_energy = min(5, master_energy)
		end
		! update overexerted moodlet state, which affects the color of energy stars (TODO: not fully implemented)
		!if master_energy < 0 or already_done_today[1] >= master_str:
		!	master_moodlet['neg_master_overexerted'] = 100
		!else
		!	master_moodlet['neg_master_overexerted'] = 0
		!end
		! assemble row of images corresponding to current energy level and exhaustion status
		if master_energy = 0:
			if master_half_action = 1:
				$master_energy_stars = '<img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_red_half.png">'
			elseif master_half_action = -1:
				$master_energy_stars = IIF(master_moodlet['neg_master_overexerted'] = 0, '<img src = "content/pic/ui overhaul/energy/energy_green_half.png">', '<img src = "content/pic/ui overhaul/energy/energy_purple_half.png">') + '<img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_empty.png"><img src = "content/pic/ui overhaul/energy/energy_empty.png">'
			else
				$master_energy_stars = '-'
			end
		else
			if master_energy < 0:
				for i = 1 to (5 + master_energy) step 1: $master_energy_stars += IIF(i = (5 + master_energy) and master_half_action = 1, '<img src = "content/pic/ui overhaul/energy/energy_red_half.png">', '<img src = "content/pic/ui overhaul/energy/energy_empty.png">')
				for i = 1 to (-1 * master_energy) step 1: $master_energy_stars += IIF(i = 1 and (master_half_action MOD 2) = -1, '<img src = "content/pic/ui overhaul/energy/energy_red_half.png">', '<img src = "content/pic/ui overhaul/energy/energy_red.png">')
			else
				for i = 1 to (master_energy + max(0, master_half_action/-2)) step 1: $master_energy_stars += IIF(i = master_energy and master_half_action = 1, IIF(master_moodlet['neg_master_overexerted'] = 0, '<img src = "content/pic/ui overhaul/energy/energy_green_half.png">', '<img src = "content/pic/ui overhaul/energy/energy_purple_half.png">'), IIF(master_moodlet['neg_master_overexerted'] = 0, '<img src = "content/pic/ui overhaul/energy/energy_green.png">', '<img src = "content/pic/ui overhaul/energy/energy_purple.png">'))
				if (master_half_action MOD 2) = -1:
					$master_energy_stars += IIF(master_moodlet['neg_master_overexerted'] = 0, '<img src = "content/pic/ui overhaul/energy/energy_green_half.png">', '<img src = "content/pic/ui overhaul/energy/energy_purple_half.png">')
					if (5 - master_energy - max(0, master_half_action/-2)) > 1: for i = 2 to (5 - master_energy) step 1: $master_energy_stars += '<img src = "content/pic/ui overhaul/energy/energy_empty.png">'
				elseif (5 - master_energy - max(0, master_half_action/-2)) > 0:
					for i = 1 to (5 - master_energy - max(0, master_half_action/-2)) step 1: $master_energy_stars += '<img src = "content/pic/ui overhaul/energy/energy_empty.png">'
				end
			end
		end

	}
end
if master_energy < -5: master_energy = -5
if master_energy > 5: master_energy = 5
dynamic $update_master_energy_stars

!Update situational master moodlets (expects slaves have been updated already - specifically, $newloc_update_slave in #static_base)
gs 'moodlets' &! depends on house_mess, master_hygiene, master_wealth, brand_reputation, master_excitement, master_energy, master_str, does not depend on master_style

! $moodlets_account refreshes mood (and mood description strings) for master
gs '$moodlets_account'

!style update after hygiene, energy and mood updates (above) and before updating master_supermacy (below) - ImperatorAugustus
master_style = 2 + style_modifer[$master_cloth] - max(0, master_hygiene - 2)
if master_hygiene = 0: master_style += 1
if master_energy > 0: master_style += 1
if master_energy < 0: master_style -= 1
if master_visage > 0: master_style += 1
if master_visage = 0: master_style -= 1
if master_haircut > 0: master_style += 1
if master_haircut = 0: master_style -= 1
if master_str > 3: master_style += 1
if master_str < 3: master_style -= 1
if master_mood > 0: master_style += 1
if master_mood < 0: master_style -= 1
if master_style > 5: master_style = 5
if master_style < 0: master_style = 0

!Calculate Master Supermacy

master_supermacy = (master_cha + master_domination + master_style + master_str + slave['beaten_ever'] + magna_magnifika + item_supermacy_bonus) - (slave['temper'] + slave['ego'] + slave['pride'] + slave['stamina'] + (slave['intellect'] - 3))
if $master_cloth = 'regal_suit': master_supermacy += 1
if $master_cloth = 'comfy_robes': master_supermacy -= 1
if $master_back_wpn = 'посох_огня': master_supermacy += 2

! lolis are easier to dominate.  Uncle Tom is particularly good at it, and it’s easier for Johny to pick on someone smaller than him
if slave['age'] = CONST_INT['loli_age']:
	master_supermacy += 2
	if hero_select = 5:  master_supermacy += 3  &! Teacher
	if hero_select = 9:  master_supermacy += 8  &! Old Man
	if hero_select = 10: master_supermacy += 1  &! Kid
end
if slave['age'] = CONST_INT['milf_age']:
	if hero_select = 8:  master_supermacy += 2  &! Butler
	if hero_select = 9:  master_supermacy -= 1  &! Old Man
end
if slave['age'] = CONST_INT['young_age']:
	if hero_select = 5:  master_supermacy += 2  &! Teacher
end

--- $calculate_attributes ---------------------------------


code:
# $city_random_event
!random events in city (TODO: at the moment these are NON-random do-once events, so we might want to make a new $city_nonrandom_event location for these -ImperatorAugustus)

if city_form = 61 and isabella_met = 0 and assistant_state = CONST_INT['no_slave'] and $estate ! 'slum_house':
	isabella_met = 1
	interaction_city = 610
	gt 'interaction_city'
end

if julia_start = 0 and hero_choice = 10 and no_loli ! 1 and npc_progress['pope'] = 2:
	julia_start = 1
end

if julia_start = 1 and already_done_today['julia_counter'] = 0:
	julia_counter += 1
	already_done_today['julia_counter'] += 1
end

if julia_start = 1 and julia_counter >= 5:
	julia_start = 2
	msg 'As you step out, you discover a letter has been delivered to you. It reads:
' + _
		'  Respected <<$master_name>>,
' + _
		'  A human girl has come to the Vatican, claiming that she is your long-lost sister.
' + _
		'  We do not know the veracity of that claim, but what is certain is that she has suffered, and it is only by God’s grace that she is alive.'
	msg '  She longs to see you, and awaits your visitation here at the Vatican.
' + _
		'  We shall provide her with shelter and care until the truth is established.
' + _
		'  Sincerely, Johanna    Secretary of the Pope'
end
--- $city_random_event ---------------------------------


code:
# $combat_variable_reset
!Combat variable reset
!Created by crushboss

a = 0
get_weapon = 0
nogoto = 0
memcf = 0
colosseum_fight = 0
get_girl = 0
$sp_text[1] = ''
$sp_text[2] = ''
$text_display = ''
$итог_боя = ''

поверженные_враги = 0
atk = 0
def = 0
слабость = 0
шаткость = 0
ошеломление = 0
рассеянность = 0
хрупкий = 0
это_суперудар = 0
здоровье_врага = 0
модификатор = 0

!Do not enable the below variable - bug fix - crushboss
!нанесенный_вред = 0

в_отключке = 0
бесстрашный = 0
безустали = 0
выносливость_врага = 0
слабость = 0
боль = 0
враг = 0
труп = 0
тр = 0
шаткость = 0
текущий = 0
дух_игрока = 0
дух_врага = 0
длительность = 0
супер = 0
случай = 0

суперудар_сделан[11] = 0
суперудар_сделан[12] = 0
суперудар_сделан[13] = 0
суперудар_сделан[14] = 0
суперудар_сделан[15] = 0
суперудар_сделан[16] = 0
суперудар_сделан[17] = 0
суперудар_сделан[18] = 0
суперудар_сделан[22] = 0
суперудар_сделан[23] = 0
суперудар_сделан[24] = 0
суперудар_сделан[25] = 0

!Current weapon variables - Trinity Engine
вред_оружия_игрока = 0
$тип_вреда_оружия = ''
$первый_пункт = ''
$тип_первой_атаки = ''
$первый_бонус = ''
$первый_штраф = ''
$второй_пункт = ''
$тип_второй_атаки = ''
$второй_бонус = ''
$второй_штраф = ''

$действия_игрока = ''
$плохие_эффекты_проивника = ''
$хорошие_эффекты_противника = ''
$вырубленный_моб_в_локацию = ''
$эффекты_противника = ''
$первое_действие = ''
$второе_действие = ''
$пинок = ''
$толчок = ''
$подсечка = ''
$боевое_меню = ''
$класс_врага = ''
$наложение = ''
$трофей = ''

$оружие = ''
$вторичный = ''

$за_спиной = ''
$слева = ''
$справа = ''
$предплечье = ''
$в_сапоге = ''

$класс_оружия = ''
$класс_оружия[$за_спиной] = ''
$класс_оружия[$слева] = ''
$класс_оружия[$справа] = ''
$класс_оружия[$предплечье] = ''
$класс_оружия[$в_сапоге] = ''

$тип_нанесенного_вреда = ''
$информация_о_бое = ''
$боевая_обстановка = ''
$действия_игрока = ''
$эффект_суператаки = ''

$меню_суперудар[1] = ''
$меню_суперудар[2] = ''
$меню_суперудар[3] = ''
$меню_суперудар[4] = ''
$меню_суперудар[5] = ''
$меню_суперудар[6] = ''
$меню_суперудар[7] = ''
$меню_суперудар[8] = ''
$действия_врага[1] = ''
$действия_врага[2] = ''
$действия_врага[3] = ''
$действия_врага[4] = ''
$действия_врага[5] = ''
$действия_врага[6] = ''
$действия_врага[7] = ''
$действия_врага[8] = ''
$действия_врага[9] = ''
$действия_врага[10] = ''
$действия_врага[11] = ''
$действия_врага[12] = ''
$действия_врага[13] = ''
$действия_врага[14] = ''
$действия_врага[15] = ''
$действия_врага[16] = ''
$действия_врага[17] = ''
$действия_врага[18] = ''

killvar '$состояние'
killvar 'слабость'
killvar 'скованность'
killvar 'боль'
killvar 'шаткость'
killvar 'ошеломление'
killvar 'рассеянность'
killvar 'бешенство'
killvar 'разгон'
killvar 'меткость'
killvar 'адреналин'
killvar 'верткость'
killvar 'внимание'

killvar 'суперудар'
killvar 'наложение'
killvar '$боевая_обстановка'
killvar '$действия_игрока'
killvar '$действия_врага'

killvar 'суперудар_сделан'
killvar '$боевое_меню'
killvar '$меню_суперудар'
killvar '$информация_о_бое'
killvar '$боевая_обстановка'
killvar '$действия_врага'
killvar '$рассчетный_тип_вреда'

killvar '$класс_врага'
killvar '$наложение'
killvar '$оружие'
killvar '$вторичный'
killvar '$ключевые_условия'
killvar '$суперудар_условие'
killvar 'нанесенный_вред'

killvar '$эффект_суператаки'

!Current special technique variables
killvar 'базовый_вред'
killvar '$тип_вреда'
killvar '$суперудар_тип'
killvar '$суперудар_название'
killvar 'суперудар_длительность'
killvar '$суперудар_текст'
killvar '$спецэффект_описание'
killvar '$спецэффект_суперудара'
killvar '$суперудар_условие_1'
killvar '$суперудар_условие_2'
killvar '$суперудар_условие_против'

!Current weapon variables - Weapon Database - #боевые_предметы

!Do not enable the below variables - bug fix - crushboss
!killvar 'вред_на_рассчет'
!killvar '$описание_предмета'
!killvar '$item_name'
!killvar '$get_weapon'

killvar 'базовый_вред'
killvar '$тип_вреда'
killvar '$класс_оружия'
killvar '$атака_1_тип'
killvar '$атака_1_название'
killvar '$атака_1_штраф'
killvar '$атака_1_бонус'
killvar 'атака_1_длительность'
killvar '$атака_1_текст'
killvar '$атака_2_тип'
killvar '$атака_2_название'
killvar '$атака_2_штраф'
killvar '$атака_2_бонус'
killvar '$атака_2_текст'
killvar 'атака_2_длительность'

killvar 'вторичная_атака'
killvar '$вторичная_атака_тип'
killvar '$вторичная_атака_название'
killvar '$вторичная_атака_штраф'
killvar '$вторичная_атака_бонус'
killvar 'вторичная_атака_длительность'
killvar '$вторичная_атака_текст'

killvar '$ключевое_слово_1'
killvar '$ключевое_слово_2'
killvar '$ключевое_слово_3'
killvar '$ключевое_слово_4'
killvar '$ключевое_слово_5'

killvar '$display_options'
killvar '$memplace'
killvar "no_wpn"

killvar '$extra_special_active'
killvar '$extra_special_used'
killvar '$враг'
killvar '$ge'

!fight database
!gs '#тексты_движка'
!gs '#противники'
!gs '#суперудары'
!gs '#боевые_предметы'

--- $combat_variable_reset ---------------------------------


code:
# $counter
!Location counter, handles music playlist
!if $music_theme ! $music_theme_prev:
! 	close all
! 	$music_theme_prev = $music_theme
! 	copyarr 'play_theme', '<<$music_theme>>'
! 	track = 0
!end
!
!if music_volume > 0:
! 	if no isplay($play_theme[track]):
!  		track += 1
!  		if track = arrsize('play_theme'): track = 0
! 	end
! 	play $play_theme[track], music_volume
!end
--- $counter ---------------------------------