<commit_before>-- LTE fr das Druidensystem
-- by Falk
-- Zeitverlauf und Rckwandlung bei Verwandlungen
require("base.common")

module("druid.lte.id_329_transformation", package.seeall)

-- INSERT INTO longtimeeffects VALUES (329, 'druids_transformation', 'druid.lte.id_329_transformation');

function getAction(User,Effect,Runde)
	--Hier die eigentlichen Aktionen eintragen  
end
  
function addEffect(Effect, User)               -- Nur beim ersten Aufruf
	--User:inform("debug func addEffect")
end

function callEffect(Effect,User)                  -- Effect wird ausgefhrt
--User:inform("debug func callEffect")
    findCounter,counterBlack = Effect:findValue("counterBlack")
    if findCounter then
	
	   if counterBlack > 0 then
		  
		  counterBlack = counterBlack - 1; -- reduce of the effect counter
		  Effect:addValue("counterBlack",counterBlack)
		   
		   if counterBlack == 0 then
				-- the effect counter is down to zero; we change the char back
			    findOnlyRace, OnlyRace = Effect:findValue("OnlyRace")
			    if findOnlyRace then
				    if OnlyRace == 0 then
					
					  findOld_sex, old_sex = Effect:findValue("old_sex")
					  if findOld_sex then
						 User:setAttrib("sex",old_sex)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_hair, old_hair = Effect:findValue("old_hair")
					  if findOld_hair then
						 User:setHair(old_hair)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_beard, old_beard = Effect:findValue("old_beard")
					  if findOld_beard then
						 User:setBeard(old_beard)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_skincolor, old_skincolor = Effect:findValue("old_skincolor")
					  if findOld_skincolor then
						 User:setSkinColor(old_skincolor)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_haircolor, old_haircolor = Effect:findValue("old_haircolor")
					  if findOld_haircolor then
						 User:setHairColor(old_haircolor)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end    
				   end
			
			        findNew_race, new_race = Effect:findValue("new_race")	
		            if findNew_race then
			           User:setAttrib("racetyp",new_race)
		           else
			           User:inform("LTE-Error 1: please call dev") 
		           end

		           -- findNew_height, new_height = Effect:findValue("new_height")
		           --if findNew_race then
			          --User:setAttrib("body_height",new_height) 
		           --else
			          --User:inform("LTE-Error 1: please call dev") 
		           --end
			   else
			     User:inform("LTE-Error 1: please call dev") 
			   end
			end
	   else
		   
		   findCooldown,cooldownBlack = Effect:findValue("cooldownBlack")
		   if findCooldown then
				if cooldownBlack <= 0 then
				   User:inform("return false")
				   return false
			   else 
				   cooldownBlack = cooldownBlack - 1;
				   User:inform("cooldown - 1 = "..cooldownBlack)
				   Effect:addValue("cooldownBlack",cooldownBlack)
				   User:inform("return true")
				   return true
			   end
		   else
		      User:inform("LTE-Error 1: please call dev") 
		   end
	   end   
   else
     User:inform("LTE-Error 1: please call dev") 
   end

   Effect.nextCalled = 50
   
end

function removeEffect(Effect,USer)         
	
end

function loadEffect(Effect,User)
    findCounter,counterBlack = Effect:findValue("counterBlack")	
	if findCounter then	
	   if counterBlack > 0 then -- check if the actual effect is still active
		
			findOnlyRace, OnlyRace = Effect:findValue("OnlyRace")
			if findOnlyRace then
			   if OnlyRace = 0 then
				  
				  findNew_sex, new_sex = Effect:findValue("new_sex")
				  if findNew_sex then
					 User:setAttrib("sex",new_sex)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_hair, new_hair = Effect:findValue("new_hair")
				  if findNew_hair then
					 User:setHair(new_hair)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_beard, new_beard = Effect:findValue("new_beard")
				  if findNew_beard then
					 User:setBeard(new_beard)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_skincolor, new_skincolor = Effect:findValue("new_skincolor")
				  if findNew_skincolor then
					 User:setSkinColor(new_skincolor)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_haircolor, new_haircolor = Effect:findValue("new_haircolor")
				  if findNew_haircolor then<commit_msg>debugging<commit_after>-- LTE fr das Druidensystem
-- by Falk
-- Zeitverlauf und Rckwandlung bei Verwandlungen
require("base.common")

module("druid.lte.id_329_transformation", package.seeall)

-- INSERT INTO longtimeeffects VALUES (329, 'druids_transformation', 'druid.lte.id_329_transformation');

function getAction(User,Effect,Runde)
	--Hier die eigentlichen Aktionen eintragen  
end
  
function addEffect(Effect, User)               -- Nur beim ersten Aufruf
	--User:inform("debug func addEffect")
end

function callEffect(Effect,User)                  -- Effect wird ausgefhrt
--User:inform("debug func callEffect")
    findCounter,counterBlack = Effect:findValue("counterBlack")
    if findCounter then
	
	   if counterBlack > 0 then
		  
		  counterBlack = counterBlack - 1; -- reduce of the effect counter
		  Effect:addValue("counterBlack",counterBlack)
		   
		   if counterBlack == 0 then
				-- the effect counter is down to zero; we change the char back
			    findOnlyRace, OnlyRace = Effect:findValue("OnlyRace")
			    if findOnlyRace then
				    if OnlyRace == 0 then
					
					  findOld_sex, old_sex = Effect:findValue("old_sex")
					  if findOld_sex then
						 User:setAttrib("sex",old_sex)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_hair, old_hair = Effect:findValue("old_hair")
					  if findOld_hair then
						 User:setHair(old_hair)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_beard, old_beard = Effect:findValue("old_beard")
					  if findOld_beard then
						 User:setBeard(old_beard)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_skincolor, old_skincolor = Effect:findValue("old_skincolor")
					  if findOld_skincolor then
						 User:setSkinColor(old_skincolor)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end
					  
					  findOld_haircolor, old_haircolor = Effect:findValue("old_haircolor")
					  if findOld_haircolor then
						 User:setHairColor(old_haircolor)
					  else
						 User:inform("LTE-Error 1: please call dev") 
					  end    
				   end
			
			        findNew_race, new_race = Effect:findValue("new_race")	
		            if findNew_race then
			           User:setAttrib("racetyp",new_race)
		           else
			           User:inform("LTE-Error 1: please call dev") 
		           end

		           -- findNew_height, new_height = Effect:findValue("new_height")
		           --if findNew_race then
			          --User:setAttrib("body_height",new_height) 
		           --else
			          --User:inform("LTE-Error 1: please call dev") 
		           --end
			   else
			     User:inform("LTE-Error 1: please call dev") 
			   end
			end
	   else
		   
		   findCooldown,cooldownBlack = Effect:findValue("cooldownBlack")
		   if findCooldown then
				if cooldownBlack <= 0 then
				   User:inform("return false")
				   return false
			   else 
				   cooldownBlack = cooldownBlack - 1;
				   User:inform("cooldown - 1 = "..cooldownBlack)
				   Effect:addValue("cooldownBlack",cooldownBlack)
				   User:inform("return true")
				   return true
			   end
		   else
		      User:inform("LTE-Error 1: please call dev") 
		   end
	   end   
   else
     User:inform("LTE-Error 1: please call dev") 
   end

   Effect.nextCalled = 50
   
end

function removeEffect(Effect,USer)         
	
end

function loadEffect(Effect,User)
    findCounter,counterBlack = Effect:findValue("counterBlack")	
	if findCounter then	
	   if counterBlack > 0 then -- check if the actual effect is still active
		
			findOnlyRace, OnlyRace = Effect:findValue("OnlyRace")
			if findOnlyRace then
			   if OnlyRace == 0 then
				  
				  findNew_sex, new_sex = Effect:findValue("new_sex")
				  if findNew_sex then
					 User:setAttrib("sex",new_sex)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_hair, new_hair = Effect:findValue("new_hair")
				  if findNew_hair then
					 User:setHair(new_hair)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_beard, new_beard = Effect:findValue("new_beard")
				  if findNew_beard then
					 User:setBeard(new_beard)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_skincolor, new_skincolor = Effect:findValue("new_skincolor")
				  if findNew_skincolor then
					 User:setSkinColor(new_skincolor)
				  else
					 User:inform("LTE-Error 1: please call dev") 
				  end
				  
				  findNew_haircolor, new_haircolor = Effect:findValue("new_haircolor")
				  if findNew_haircolor then
{'fraction_non_alphanumeric': 0.08573263405758322, 'fraction_numerical': 0.007278176174676228, 'mean_word_length': 2.4214573416331016, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4314226', 'n_tokens_mistral': 3890, 'n_tokens_neox': 2865, 'n_words': 677}