;Test Disabled agents 23 and agents 24 to bypass CTD.
;
;SS6.2 Byg's Grim Reality IV Version Traits file 05-09-09.
;Non BGR features edited by Quark 1-May-2008 (see readme in ss6.1) and later by Gracul SS6.2RC4
;Non BGR Feaures Last Edited by Byg 22-01-09
;Integrated with Caralampio's Odds and Ends Aug 29 2009
;=======================================================================
;               Blood, Broads and Bastards VnV VERSION 2.1                          
;=======================================================================
; by Dearmad and Pnutmaster - 2007 (thanks Re Berengario I ;)

;Index
;Prelude: SEASONAL RECOGNITION  
;Part I: B.B.B TRAITS
;Part I - Section I: BLOODLINES
;Part I - Section II: MARRIAGE TRAITS
;Part I - Section III: HEREDITY TRAITS
;Part I - Section IV: HEALTH SYSTEM
;Part I - Section V: REBELLION SYSTEM
;Part I - Section VI: AGENT TRAITS
;Part I - Section VII: KINGDOM TRAITS
;Part I - Section VIII: EDUCATION TRAITS
;Part I - Section IX: MILITARISTIC TRAITS
;Part I - Section X: MISC TRAITS
;Part I - Section XI: WIP TRAITS

;Part II: VANILLA TRAITS (tweaked, of course)
;Part II - Section I: FACTION LEADER/FACTION HEIR TRAITS
;Part II - Section II: VANILLA MILITARISTIC TRAITS
;Part II - Section III: PERSONALITY TRAITS
;Part II - Section IV: VANILLA MARRIAGE TRAITS 
;Part II - Section V: PRINCESS TRAITS
;Part II - Section VI: ADMIRAL TRAITS 
;Part II - Section VII: PRIEST TRAITS
;Part II - Section VIII: INQUISITOR TRAITS
;Part II - Section IX: MERCHANTILE TRAITS
;Part II - Section X: DIPLOMAT TRAITS 
;Part II - Section XI: SPY TRAITS 
;Part II - Section XII: ASSASSIN TRAITS
;Part II - Section XIII: HERETIC TRAITS
;Part II - Section XIV: WITCH TRAITS  


;----------------------------
; BYZANTINE CAREER TRAITS
;----------------------------

Trait  Military_Career_In_Byzantium
       Characters family

    Level Comes
        Description Comes_desc
        EffectsDescription Comes_effects_desc
        GainMessage Comes_desc
        Threshold 1
	
          
          Effect Loyalty  1
          Effect HitPoints  1
          Effect Fertility 1

    Level Hiliarches
        Description Hiliarches_desc
        EffectsDescription Hiliarches_effects_desc
        GainMessage Hiliarches_desc
        Threshold  8 

      Effect Loyalty  1
      Effect HitPoints  1
      Effect Fertility 1

   Level Taxiarches
        Description Taxiarches_desc
        EffectsDescription Taxiarches_effects_desc
        GainMessage Taxiarches_desc
        Threshold  16 

      Effect Loyalty 2
      Effect Command  1
      Effect HitPoints  1
      Effect LineOfSight 1

   Level Droungarios
        Description Droungarios_desc
        EffectsDescription Droungarios_effects_desc
        GainMessage Droungarios_desc        
        Threshold  24 
	
	Effect Loyalty 2
        Effect Command  1
        Effect HitPoints  1
        Effect LineOfSight 1

   Level Merarches
        Description Merarches_desc
        EffectsDescription Merarches_effects_desc
        GainMessage Merarches_desc
	Threshold  34 
	
	Effect Loyalty 2
        Effect Command  1
        Effect SiegeEngineering  10
        Effect TroopMorale 1


   Level Tourmarches
        Description Tourmarches_desc
        EffectsDescription Tourmarches_effects_desc
        GainMessage Tourmarches_desc
	Threshold  44 
	
	Effect Loyalty 2
        Effect Command  1
        Effect PersonalSecurity  1
        Effect SiegeEngineering  20
        Effect TroopMorale 1

   Level Strategos
        Description Strategos_desc
        EffectsDescription Strategos_effects_desc
        GainMessage Strategos_desc
	Threshold  56 
	
	Effect Loyalty 2
        Effect Command  2
        Effect PersonalSecurity  2
        Effect SiegeEngineering  30
        Effect TroopMorale 2
        Effect LocalPopularity  1
        
   Level Sevastos
        Description Sevastos_desc
        EffectsDescription Sevastos_effects_desc
        GainMessage Sevastos_desc
	Threshold  60 
	
	Effect Loyalty 3
        Effect Command  2
        Effect PersonalSecurity  2
        Effect SiegeEngineering  30
        Effect TroopMorale 2
        Effect LocalPopularity  1

   Level Magistrus 
        Description Magistrus_desc
        EffectsDescription Magistrus_effects_desc
        GainMessage Magistrus_desc
	Threshold  65 
	
	Effect Loyalty 3
        Effect Command  2
        Effect PersonalSecurity  3
        Effect SiegeEngineering  3
	Effect TroopMorale 3
        Effect LocalPopularity  2

;  Level Domestikos
;        Description Domestikos_desc
;        EffectsDescription Domestikos_effects_desc
;        GainMessage Domestikos_desc
;	Threshold  84 
;
;        Effect Command  2
;        Effect PersonalSecurity  2
;        Effect SiegeEngineering  30
;        Effect TroopMorale 3
;        Effect LocalPopularity  2

;============================
;    Kingdom Traits   
;============================
;------------------------------------------
Trait SpanishExplorer
    Characters family

    Level Spanish_Explorer
        Description Spanish_Explorer_desc
        EffectsDescription Spanish_Explorer_effects_desc
        Threshold  1 

        Effect Command  2 
        Effect TroopMorale  3 
        Effect Authority  1 
        Effect Level  3 

;------------------------------------------
Trait ScotlandHero
    Characters family

    Level Hero_of_Scotland
        Description Hero_of_Scotland_desc
        EffectsDescription Hero_of_Scotland_effects_desc
        Threshold  1 

        Effect Command  1 
        Effect TroopMorale  3 
        Effect Level  3 
        Effect Combat_V_Faction_England  3 

;------------------------------------------
Trait PaganPriest
    Characters priest
    Hidden

    Level Pagan_Priest
        Description Pagan_Priest_desc
        EffectsDescription Pagan_Priest_effects_desc
        Threshold  1 

        Effect Level  1 

    Level Pagan_High_Priest
        Description Pagan_High_Priest_desc
        EffectsDescription Pagan_High_Priest_effects_desc
        Threshold  2 

        Effect Level  2 

;------------------------------------------
Trait DivineProtectionPagan
    Characters priest
    AntiTraits Doomsayer

    Level Blessed_by_the_Gods
        Description Blessed_by_the_Gods_desc
        EffectsDescription Blessed_by_the_Gods_effects_desc
        Threshold  1 

        Effect Violence  1 

    Level Protected_by_the_Gods
        Description Protected_by_the_Gods_desc
        EffectsDescription Protected_by_the_Gods_effects_desc
        Threshold  3 

        Effect Piety  1 
        Effect Violence  1 

    Level Chosen_by_the_Gods
        Description Chosen_by_the_Gods_desc
        EffectsDescription Chosen_by_the_Gods_effects_desc
        Epithet Chosen_by_the_Gods_epithet_desc
        Threshold  6 

        Effect Piety  2 
        Effect Violence  2 

;------------------------------------------
Trait FactionleaderTO
    Characters family
    AntiTraits FactionheirTO

    Level Hochmeister
        Description Hochmeister_desc
        EffectsDescription Hochmeister_effects_desc
        Threshold  1 

        Effect Command  1 
        Effect Authority  2 
        Effect TroopMorale  2 
        Effect PersonalSecurity  3
		Effect Level 2 

;------------------------------------------
Trait FactionheirTO
    Characters family
    AntiTraits Exheir

    Level Grosskomtur
        Description Grosskomtur_desc
        EffectsDescription Grosskomtur_effects_desc
        Threshold  1 

        Effect Loyalty  2 
        Effect TroopMorale  1 
        Effect PersonalSecurity  2 
        Effect Level  1 

;------------------------------------------
Trait MinorRanksTO
    Characters family

    Level Komturei
        Description Komturei_desc
        EffectsDescription Komturei_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect PersonalSecurity  1 

    Level Landmeister
        Description Landmeister_desc
        EffectsDescription Landmeister_effects_desc
        Threshold  5 

        Effect Loyalty  1 
        Effect TroopMorale  1 
        Effect PersonalSecurity  1 

;------------------------------------------
Trait FactionleaderTemplars
    Characters family
    AntiTraits FactionheirTO

    Level GrandMaster
        Description GrandMaster_desc
        EffectsDescription GrandMaster_effects_desc
        Threshold  1 

        Effect Command  1 
        Effect Authority  2 
        Effect TroopMorale  2 
        Effect PersonalSecurity  3 
        Effect Level  2 

;------------------------------------------
Trait FactionheirTemplars
    Characters family
    AntiTraits Exheir

    Level TemplarHeir
        Description TemplarHeir_desc
        EffectsDescription TemplarHeir_effects_desc
        Threshold  1 

        Effect Loyalty  2 
        Effect TroopMorale  1 
        Effect PersonalSecurity  2 
        Effect Level  1 

;------------------------------------------
Trait MinorRanksTemplars
    Characters family

    Level ProvincialMaster
        Description ProvincialMaster_desc
        EffectsDescription ProvincialMaster_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect PersonalSecurity  1 

    Level TemplarCommander
        Description TemplarCommander_desc
        EffectsDescription TemplarCommander_effects_desc
        Threshold  5 

        Effect Loyalty  1 
        Effect TroopMorale  1 
        Effect PersonalSecurity  1 

;======================
;    B.B.B TRAITS   
;======================

;------------------------------------------
Trait Merchantfamily
    Characters merchant
    
    Level Smallmfamily
        Description Smallmfamily_desc
        EffectsDescription Smallmfamily_effects_desc
        Threshold  1

	Effect Finance 1

    Level Largemfamily
        Description Largemfamily_desc
        EffectsDescription Largemfamily_effects_desc
        Threshold  2

        Effect Finance 2

;*********  BLOODLINES  *********

;------------------------------------------
Trait Royal_Founder
    Characters family

    Level Royal_Founder
        Description Royal_Founder_desc
        EffectsDescription Royal_Founder_effects_desc
        Threshold 1

	Effect Fertility 1
	Effect Authority 1

;------------------------------------------
Trait HouseFounder
    Characters family
    
    Level HouseFounder
        Description HouseFounder_desc
        EffectsDescription HouseFounder_effects_desc
        Threshold  1

        Effect PersonalSecurity  2

;------------------------------------------
Trait HouseMember
    Characters family
    
    Level HouseMember
        Description HouseMember_desc
        EffectsDescription HouseMember_effects_desc
        Threshold  1

        Effect Loyalty  1

;------------------------------------------
Trait HousePrincess
    Characters princess
    
    Level HousePrincess
        Description HousePrincess_desc
        EffectsDescription HousePrincess_effects_desc
        Threshold  1

        Effect PersonalSecurity  1

;------------------------------------------
Trait Royal_Blood_English
    Characters family

  Level Royal_Blood_English
        Description Royal_Blood_English_desc
        EffectsDescription Royal_Blood_English_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Chivalry 1

;------------------------------------------
Trait Royal_Relation_English
    Characters family

  Level Royal_Relation_English
        Description Royal_Relation_English_desc
        EffectsDescription Royal_Relation_English_effects_desc
        Threshold 1

     Effect Chivalry 1

;------------------------------------------
Trait Princess_Royal_Blood_English
    Characters princess

  Level Princess_Royal_Blood_English
        Description Princess_Royal_Blood_English_desc
        EffectsDescription Princess_Royal_Blood_English_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_French
    Characters family

  Level Royal_Blood_French
        Description Royal_Blood_French_desc
        EffectsDescription Royal_Blood_French_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Chivalry 1

;------------------------------------------
Trait Royal_Relation_French
    Characters family

  Level Royal_Relation_French
        Description Royal_Relation_French_desc
        EffectsDescription Royal_Relation_French_effects_desc
        Threshold 1

     Effect Chivalry 1

;------------------------------------------
Trait Princess_Royal_Blood_French
    Characters princess

  Level Princess_Royal_Blood_French
        Description Princess_Royal_Blood_French_desc
        EffectsDescription Princess_Royal_Blood_French_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_HRE
    Characters family

  Level Royal_Blood_HRE
        Description Royal_Blood_HRE_desc
        EffectsDescription Royal_Blood_HRE_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Law 1

;------------------------------------------
Trait Royal_Relation_HRE
    Characters family

  Level Royal_Relation_HRE
        Description Royal_Relation_HRE_desc
        EffectsDescription Royal_Relation_HRE_effects_desc
        Threshold 1

    Effect Law 1

;------------------------------------------
Trait Princess_Royal_Blood_HRE
    Characters princess

  Level Princess_Royal_Blood_HRE
        Description Princess_Royal_Blood_HRE_desc
        EffectsDescription Princess_Royal_Blood_HRE_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Spanish
    Characters family

  Level Royal_Blood_Spanish
        Description Royal_Blood_Spanish_desc
        EffectsDescription Royal_Blood_Spanish_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Piety 1

;------------------------------------------
Trait Royal_Relation_Spanish
    Characters family

  Level Royal_Relation_Spanish
        Description Royal_Relation_Spanish_desc
        EffectsDescription Royal_Relation_Spanish_effects_desc
        Threshold 1 

     Effect Piety 1

;------------------------------------------
Trait Princess_Royal_Blood_Spanish
    Characters princess

  Level Princess_Royal_Blood_Spanish
        Description Princess_Royal_Blood_Spanish_desc
        EffectsDescription Princess_Royal_Blood_Spanish_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Sicilian
    Characters family

  Level Royal_Blood_Sicilian
        Description Royal_Blood_Sicilian_desc
        EffectsDescription Royal_Blood_Sicilian_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Law 1

;------------------------------------------
Trait Royal_Relation_Sicilian
    Characters family

  Level Royal_Relation_Sicilian
        Description Royal_Relation_Sicilian_desc
        EffectsDescription Royal_Relation_Sicilian_effects_desc
        Threshold 1

     Effect Law 1

;------------------------------------------
Trait Princess_Royal_Blood_Sicilian
    Characters princess

  Level Princess_Royal_Blood_Sicilian
        Description Princess_Royal_Blood_Sicilian_desc
        EffectsDescription Princess_Royal_Blood_Sicilian_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Venetian
    Characters family

  Level Royal_Blood_Venetian
        Description Royal_Blood_Venetian_desc
        EffectsDescription Royal_Blood_Venetian_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Trading 3

;------------------------------------------
Trait Royal_Relation_Venetian
    Characters family

  Level Royal_Relation_Venetian
        Description Royal_Relation_Venetian_desc
        EffectsDescription Royal_Relation_Venetian_effects_desc
        Threshold 1

     Effect Trading 2

;------------------------------------------
Trait Princess_Royal_Blood_Venetian
    Characters princess

  Level Princess_Royal_Blood_Venetian
        Description Princess_Royal_Blood_Venetian_desc
        EffectsDescription Princess_Royal_Blood_Venetian_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Milanese
    Characters family

  Level Royal_Blood_Milanese
        Description Royal_Blood_Milanese_desc
        EffectsDescription Royal_Blood_Milanese_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Trading 3

;------------------------------------------
Trait Royal_Relation_Milanese
    Characters family

  Level Royal_Relation_Milanese
        Description Royal_Relation_Milanese_desc
        EffectsDescription Royal_Relation_Milanese_effects_desc
        Threshold 1

     Effect Trading 1

;------------------------------------------
Trait Princess_Royal_Blood_Milanese
    Characters princess

  Level Princess_Royal_Blood_Milanese
        Description Princess_Royal_Blood_Milanese_desc
        EffectsDescription Princess_Royal_Blood_Milanese_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Scottish
    Characters family

  Level Royal_Blood_Scottish
        Description Royal_Blood_Scottish_desc
        EffectsDescription Royal_Blood_Scottish_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect TroopMorale 1

;------------------------------------------
Trait Royal_Relation_Scottish
    Characters family

  Level Royal_Relation_Scottish
        Description Royal_Relation_Scottish_desc
        EffectsDescription Royal_Relation_Scottish_effects_desc
        Threshold 1

     Effect TroopMorale 1

;------------------------------------------
Trait Princess_Royal_Blood_Scottish
    Characters princess

  Level Princess_Royal_Blood_Scottish
        Description Princess_Royal_Blood_Scottish_desc
        EffectsDescription Princess_Royal_Blood_Scottish_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Greek
    Characters family

  Level Royal_Blood_Greek
        Description Royal_Blood_Greek_desc
        EffectsDescription Royal_Blood_Greek_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Law 1

;------------------------------------------
Trait Royal_Relation_Greek
    Characters family

  Level Royal_Relation_Greek
        Description Royal_Relation_Greek_desc
        EffectsDescription Royal_Relation_Greek_effects_desc
        Threshold 1

    Effect Combat_V_Faction_Byzantium  1

;------------------------------------------
Trait Princess_Royal_Blood_Greek
    Characters princess

  Level Princess_Royal_Blood_Greek
        Description Princess_Royal_Blood_Greek_desc
        EffectsDescription Princess_Royal_Blood_Greek_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Russian
    Characters family

  Level Royal_Blood_Russian
        Description Royal_Blood_Russian_desc
        EffectsDescription Royal_Blood_Russian_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect MovementPoints 2

;------------------------------------------
Trait Royal_Relation_Russian
    Characters family

  Level Royal_Relation_Russian
        Description Royal_Relation_Russian_desc
        EffectsDescription Royal_Relation_Russian_effects_desc
        Threshold 1

    Effect MovementPoints 2

;------------------------------------------
Trait Princess_Royal_Blood_Russian
    Characters princess

  Level Princess_Royal_Blood_Russian
        Description Princess_Royal_Blood_Russian_desc
        EffectsDescription Princess_Royal_Blood_Russian_effects_desc
        Threshold 1

    Effect MovementPoints 2

;------------------------------------------
Trait Royal_Blood_Moorish
    Characters family

  Level Royal_Blood_Moorish
        Description Royal_Blood_Moorish_desc
        EffectsDescription Royal_Blood_Moorish_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Law 1

;------------------------------------------
Trait Royal_Relation_Moorish
    Characters family

  Level Royal_Relation_Moorish
        Description Royal_Relation_Moorish_desc
        EffectsDescription Royal_Relation_Moorish_effects_desc
        Threshold 1

;------------------------------------------
Trait Princess_Royal_Blood_Moorish
    Characters princess

  Level Princess_Royal_Blood_Moorish
        Description Princess_Royal_Blood_Moorish_desc
        EffectsDescription Princess_Royal_Blood_Moorish_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Turkish
    Characters family

  Level Royal_Blood_Turkish
        Description Royal_Blood_Turkish_desc
        EffectsDescription Royal_Blood_Turkish_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Chivalry -1

;------------------------------------------
Trait Royal_Relation_Turkish
    Characters family

  Level Royal_Relation_Turkish
        Description Royal_Relation_Turkish_desc
        EffectsDescription Royal_Relation_Turkish_effects_desc
        Threshold 1

;------------------------------------------
Trait Princess_Royal_Blood_Turkish
    Characters princess

  Level Princess_Royal_Blood_Turkish
        Description Princess_Royal_Blood_Turkish_desc
        EffectsDescription Princess_Royal_Blood_Turkish_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Egyptian
    Characters family

  Level Royal_Blood_Egyptian
        Description Royal_Blood_Egyptian_desc
        EffectsDescription Royal_Blood_Egyptian_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Piety 1

;------------------------------------------
Trait Royal_Relation_Egyptian
    Characters family

  Level Royal_Relation_Egyptian
        Description Royal_Relation_Egyptian_desc
        EffectsDescription Royal_Relation_Egyptian_effects_desc
        Threshold 1

;------------------------------------------
Trait Princess_Royal_Blood_Egyptian
    Characters princess

  Level Princess_Royal_Blood_Egyptian
        Description Princess_Royal_Blood_Egyptian_desc
        EffectsDescription Princess_Royal_Blood_Egyptian_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Danish
    Characters family

  Level Royal_Blood_Danish
        Description Royal_Blood_Danish_desc
        EffectsDescription Royal_Blood_Danish_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Chivalry -1

;------------------------------------------
Trait Royal_Relation_Danish
    Characters family

  Level Royal_Relation_Danish
        Description Royal_Relation_Danish_desc
        EffectsDescription Royal_Relation_Danish_effects_desc
        Threshold 1

     Effect Chivalry -1

;------------------------------------------
Trait Princess_Royal_Blood_Danish
    Characters princess

  Level Princess_Royal_Blood_Danish
        Description Princess_Royal_Blood_Danish_desc
        EffectsDescription Princess_Royal_Blood_Danish_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Portuguese
    Characters family

  Level Royal_Blood_Portuguese
        Description Royal_Blood_Portuguese_desc
        EffectsDescription Royal_Blood_Portuguese_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect Piety 1

;------------------------------------------
Trait Royal_Relation_Portuguese
    Characters family

  Level Royal_Relation_Portuguese
        Description Royal_Relation_Portuguese_desc
        EffectsDescription Royal_Relation_Portuguese_effects_desc
        Threshold 1

     Effect Piety 1

;------------------------------------------
Trait Princess_Royal_Blood_Portuguese
    Characters princess

  Level Princess_Royal_Blood_Portuguese
        Description Princess_Royal_Blood_Portuguese_desc
        EffectsDescription Princess_Royal_Blood_Portuguese_effects_desc
        Threshold 1

    Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Polish
    Characters family

  Level Royal_Blood_Polish
        Description Royal_Blood_Polish_desc
        EffectsDescription Royal_Blood_Polish_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect MovementPoints 1

;------------------------------------------
Trait Royal_Relation_Polish
    Characters family

  Level Royal_Relation_Polish
        Description Royal_Relation_Polish_desc
        EffectsDescription Royal_Relation_Polish_effects_desc
        Threshold 1

    Effect MovementPoints 1

;------------------------------------------
Trait Princess_Royal_Blood_Polish
    Characters princess

  Level Princess_Royal_Blood_Polish
        Description Princess_Royal_Blood_Polish_desc
        EffectsDescription Princess_Royal_Blood_Polish_effects_desc
        Threshold 1

    Effect Charm -1
    Effect PersonalSecurity 1

;------------------------------------------
Trait Royal_Blood_Hungarian
    Characters family

  Level Royal_Blood_Hungarian
        Description Royal_Blood_Hungarian_desc
        EffectsDescription Royal_Blood_Hungarian_effects_desc
        Threshold 1

    Effect Loyalty 1
    Effect MovementPoints 1

;------------------------------------------
Trait Royal_Relation_Hungarian
    Characters family

  Level Royal_Relation_Hungarian
        Description Royal_Relation_Hungarian_desc
        EffectsDescription Royal_Relation_Hungarian_effects_desc
        Threshold 1

     Effect MovementPoints 1

;------------------------------------------
Trait Princess_Royal_Blood_Hungarian
    Characters princess

  Level Princess_Royal_Blood_Hungarian
        Description Princess_Royal_Blood_Hungarian_desc
        EffectsDescription Princess_Royal_Blood_Hungarian_effects_desc
        Threshold 1

        Effect Charm 1

;============== New SS Factions ===========================
;------------------------------------------
Trait Royal_Blood_Jerusalem
    Characters family

  Level Royal_Blood_Jerusalem
        Description Royal_Blood_Jerusalem_desc
        EffectsDescription Royal_Blood_Jerusalem_effects_desc
        Threshold 1

	Effect Loyalty 1
	Effect Chivalry 1

;------------------------------------------
Trait Royal_Relation_Jerusalem
    Characters family

  Level Royal_Relation_Jerusalem
        Description Royal_Relation_Jerusalem_desc
        EffectsDescription Royal_Relation_Jerusalem_effects_desc
        Threshold 1

;------------------------------------------
Trait Princess_Royal_Blood_Jerusalem
    Characters princess

  Level Princess_Royal_Blood_Jerusalem
        Description Princess_Royal_Blood_Jerusalem_desc
        EffectsDescription Princess_Royal_Blood_Jerusalem_effects_desc
        Threshold 1

	Effect Charm 2

;------------------------------------------
Trait Royal_Blood_Aragonese
    Characters family

  Level Royal_Blood_Aragonese	
        Description Royal_Blood_Aragonese_desc
        EffectsDescription Royal_Blood_Aragonese_effects_desc
        Threshold 1

        Effect Loyalty 1
	Effect Chivalry 1

;------------------------------------------
Trait Royal_Relation_Aragonese
    Characters family

  Level Royal_Relation_Aragonese	
        Description Royal_Relation_Aragonese_desc
        EffectsDescription Royal_Relation_Aragonese_effects_desc
        Threshold 1	

     Effect Chivalry 1	

;------------------------------------------
Trait Princess_Royal_Blood_Aragonese
    Characters princess

  Level Princess_Royal_Blood_Aragonese	
        Description Princess_Royal_Blood_Aragonese_desc
        EffectsDescription Princess_Royal_Blood_Aragonese_effects_desc
        Threshold 1

        Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Lithuanian
    Characters family

  Level Royal_Blood_Lithuanian	
        Description Royal_Blood_Lithuanian_desc
        EffectsDescription Royal_Blood_Lithuanian_effects_desc
        Threshold 1

        Effect Loyalty 1
	Effect Chivalry -1

;------------------------------------------
Trait Royal_Relation_Lithuanian
    Characters family

  Level Royal_Relation_Lithuanian	
        Description Royal_Relation_Lithuanian_desc
        EffectsDescription Royal_Relation_Lithuanian_effects_desc
        Threshold 1	

;------------------------------------------
Trait Princess_Royal_Blood_Lithuanian
    Characters princess

  Level Princess_Royal_Blood_Lithuanian	
        Description Princess_Royal_Blood_Lithuanian_desc
        EffectsDescription Princess_Royal_Blood_Lithuanian_effects_desc
        Threshold 1

        Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Timurids
    Characters family

  Level Royal_Blood_Timurids	
        Description Royal_Blood_Timurids_desc
        EffectsDescription Royal_Blood_Timurids_effects_desc
        Threshold 1

	Effect Chivalry -1
	Effect Command 1

;------------------------------------------
Trait Royal_Relation_Timurids
    Characters family

  Level Royal_Relation_Timurids	
        Description Royal_Relation_Timurids_desc
        EffectsDescription Royal_Relation_Timurids_effects_desc
        Threshold 1

     Effect Command 1

;------------------------------------------
Trait Princess_Royal_Blood_Timurids
    Characters princess

  Level Princess_Royal_Blood_Timurids	
        Description Princess_Royal_Blood_Timurids_desc
        EffectsDescription Princess_Royal_Blood_Timurids_effects_desc
        Threshold 1

        Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Norwegian
    Characters family

  Level Royal_Blood_Norwegian	
        Description Royal_Blood_Norwegian_desc
        EffectsDescription Royal_Blood_Norwegian_effects_desc
        Threshold 1

        Effect Loyalty 1
	Effect Chivalry -1

;------------------------------------------
Trait Royal_Relation_Norwegian
    Characters family

  Level Royal_Relation_Norwegian	
        Description Royal_Relation_Norwegian_desc
        EffectsDescription Royal_Relation_Norwegian_effects_desc
        Threshold 1	

     Effect Chivalry -1	

;------------------------------------------
Trait Princess_Royal_Blood_Norwegian
    Characters princess

  Level Princess_Royal_Blood_Norwegian	
        Description Princess_Royal_Blood_Norwegian_desc
        EffectsDescription Princess_Royal_Blood_Norwegian_effects_desc
        Threshold 1

        Effect Charm 1

;------------------------------------------
Trait Royal_Blood_Kievan
    Characters family

  Level Royal_Blood_Kievan	
        Description Royal_Blood_Kievan_desc
        EffectsDescription Royal_Blood_Kievan_effects_desc
        Threshold 1

        Effect Loyalty 1
	Effect MovementPoints 2

;------------------------------------------
Trait Royal_Relation_Kievan
    Characters family

  Level Royal_Relation_Kievan	
        Description Royal_Relation_Kievan_desc
        EffectsDescription Royal_Relation_Kievan_effects_desc
        Threshold 1	

    Effect MovementPoints 2	

;------------------------------------------
Trait Princess_Royal_Blood_Kievan
    Characters princess

  Level Princess_Royal_Blood_Kievan	
        Description Princess_Royal_Blood_Kievan_desc
        EffectsDescription Princess_Royal_Blood_Kievan_effects_desc
        Threshold 1

        Effect Charm 1

;xxxx needs cumans and kwarezm - added Princess Cumans just in case
;------------------------------------------
Trait Royal_Blood_Cumans
    Characters family

  Level Royal_Blood_Cumans	
        Description Royal_Blood_Cumans_desc
        EffectsDescription Royal_Blood_Cumans_effects_desc
        Threshold 1

        Effect Loyalty 1
        Effect MovementPoints 2

;------------------------------------------
Trait Royal_Relation_Cumans
    Characters family

  Level Royal_Relation_Cumans	
        Description Royal_Relation_Cumans_desc
        EffectsDescription Royal_Relation_Cumans_effects_desc
        Threshold 1	

;------------------------------------------
Trait Princess_Royal_Blood_Cumans
    Characters princess

  Level Princess_Royal_Blood_Cumans	
        Description Princess_Royal_Blood_Cumans_desc
        EffectsDescription Princess_Royal_Blood_Cumans_effects_desc
        Threshold 1

        Effect Charm 1
        Effect MovementPoints 1        

;------------------------------------------
Trait Royal_Blood_Kwarezm
    Characters family
  Level Royal_Blood_Kwarezm	
        Description Royal_Blood_Kwarezm_desc
        EffectsDescription Royal_Blood_Kwarezm_effects_desc
        Threshold 1

        Effect Loyalty 1
	Effect Chivalry 1

;------------------------------------------
Trait Royal_Relation_Kwarezm
    Characters family

  Level Royal_Relation_Kwarezm	
        Description Royal_Relation_Kwarezm_desc
        EffectsDescription Royal_Relation_Kwarezm_effects_desc
        Threshold 1	

;------------------------------------------
Trait Princess_Royal_Blood_Kwarezm
    Characters princess

  Level Princess_Royal_Blood_Kwarezm	
        Description Princess_Royal_Blood_Kwarezm_desc
        EffectsDescription Princess_Royal_Blood_Kwarezm_effects_desc
        Threshold 1

        Effect Charm 1

;*********  MARRIAGE  *********
;------------------------------------------
Trait MarriageCertificate
    Characters family
    
    Level MarriageCertificate
        Description MarriageCertificate_desc
        EffectsDescription MarriageCertificate_effects_desc
        Threshold  1

;------------------------------------------
Trait WifeIsDaughterofKingPrince
    Characters family
    Hidden
    
    Level WifeIsDaughterofKingPrince
        Description WifeIsDaughterofKingPrince_desc
        EffectsDescription WifeIsDaughterofKingPrince_effects_desc
        Threshold  1

;------------------------------------------
Trait WifeIsEnglish
    Characters family
    
    Level WifeIsEnglish
        Description WifeIsEnglish_desc
        EffectsDescription WifeIsEnglish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsScottish
    Characters family
    
    Level WifeIsScottish
        Description WifeIsScottish_desc
        EffectsDescription WifeIsScottish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsFrench
    Characters family
    
    Level WifeIsFrench
        Description WifeIsFrench_desc
        EffectsDescription WifeIsFrench_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsHRE
    Characters family
    
    Level WifeIsHRE
        Description WifeIsHRE_desc
        EffectsDescription WifeIsHRE_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsSpanish
    Characters family
    
    Level WifeIsSpanish
        Description WifeIsSpanish_desc
        EffectsDescription WifeIsSpanish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsSicilian
    Characters family
    
    Level WifeIsSicilian
        Description WifeIsSicilian_desc
        EffectsDescription WifeIsSicilian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsVenetian
    Characters family
    
    Level WifeIsVenetian
        Description WifeIsVenetian_desc
        EffectsDescription WifeIsVenetian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsMilanese
    Characters family
    
    Level WifeIsMilanese
        Description WifeIsMilanese_desc
        EffectsDescription WifeIsMilanese_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsGreek
    Characters family
    
    Level WifeIsGreek
        Description WifeIsGreek_desc
        EffectsDescription WifeIsGreek_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsRussian
    Characters family
    
    Level WifeIsRussian
        Description WifeIsRussian_desc
        EffectsDescription WifeIsRussian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsMoorish
    Characters family
    
    Level WifeIsMoorish
        Description WifeIsMoorish_desc
        EffectsDescription WifeIsMoorish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsTurkish
    Characters family
    
    Level WifeIsTurkish
        Description WifeIsTurkish_desc
        EffectsDescription WifeIsTurkish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsEgyptian
    Characters family
    
    Level WifeIsEgyptian
        Description WifeIsEgyptian_desc
        EffectsDescription WifeIsEgyptian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsDanish
    Characters family
    
    Level WifeIsDanish
        Description WifeIsDanish_desc
        EffectsDescription WifeIsDanish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsPortuguese
    Characters family
    
    Level WifeIsPortuguese
        Description WifeIsPortuguese_desc
        EffectsDescription WifeIsPortuguese_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsPolish
    Characters family
    
    Level WifeIsPolish
        Description WifeIsPolish_desc
        EffectsDescription WifeIsPolish_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsHungarian
    Characters family
    
    Level WifeIsHungarian
        Description WifeIsHungarian_desc
        EffectsDescription WifeIsHungarian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;======= SS Factions =================
;------------------------------------------
Trait WifeIsAragonese
    Characters family
    
    Level WifeIsAragonese
        Description WifeIsAragonese_desc
        EffectsDescription WifeIsAragonese_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsJerusalem
    Characters family
    
    Level WifeIsJerusalem
        Description WifeIsJerusalem_desc
        EffectsDescription WifeIsJerusalem_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsLithuanian
    Characters family
    
    Level WifeIsLithuanian
        Description WifeIsLithuanian_desc
        EffectsDescription WifeIsLithuanian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsTimurids
    Characters family
    
    Level WifeIsTimurids
        Description WifeIsTimurids_desc
        EffectsDescription WifeIsTimurids_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsNorwegian
    Characters family
    
    Level WifeIsNorwegian
        Description WifeIsNorwegian_desc
        EffectsDescription WifeIsNorwegian_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsKievan
    Characters family
    
    Level WifeIsKievan
        Description WifeIsKievan_desc
        EffectsDescription WifeIsKievan_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsCumans
    Characters family
    
    Level WifeIsCumans
        Description WifeIsCumans_desc
        EffectsDescription WifeIsCumans_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsKwarezm
    Characters family
    
    Level WifeIsKwarezm
        Description WifeIsKwarezm_desc
        EffectsDescription WifeIsKwarezm_effects_desc
        Threshold  1

        Effect LocalPopularity  1

;------------------------------------------
Trait WifeIsDomineering
    Characters family

    Level Wife_is_Domineering
        Description Wife_is_Domineering_desc
        EffectsDescription Wife_is_Domineering_effects_desc
        Threshold  1 

        Effect LocalPopularity  1
 
;------------------------------------------
    Level Wife_is_Manipulative
        Description Wife_is_Manipulative_desc
        EffectsDescription Wife_is_Manipulative_effects_desc
        Threshold  2 

        Effect TroopMorale  -1
        Effect MovementPoints  -2

;------------------------------------------
Trait WifeIsRobust
    Characters family
    Hidden

    Level WifeIsRobust
        Description WifeIsRobust_desc
        EffectsDescription WifeIsRobust_effects_desc
        Threshold  1 

;------------------------------------------
Trait WifeIsSickly
    Characters family
    Hidden

    Level WifeIsSickly
        Description WifeIsSickly_desc
        EffectsDescription WifeIsSickly_effects_desc
        Threshold  1 



;********* VANILLA MARRIAGE TRAITS  *********
;------------------------------------------
Trait MarriedAPrincess
    Characters family

    Level Royal_Ties
        Description Royal_Ties_desc
        EffectsDescription Royal_Ties_effects_desc
        Threshold  1 

        Effect Loyalty  2

;------------------------------------------
;Trait has NO TRIGGER as is handled better by existing Ancillary corrolate.
Trait HasAdultress
    Characters general
    Hidden

    Level MarriedWithLover
        Description MarriedWithLover_desc
        EffectsDescription MarriedWithLover_effects_desc
        Threshold  1 

;------------------------------------------
Trait WifeIsCharming
    Characters family
    AntiTraits WifeIsHorrid

    Level Wife_is_Fair
        Description Wife_is_Fair_desc
        EffectsDescription Wife_is_Fair_effects_desc
        Threshold  1 

        Effect Fertility  1 

    Level Wife_is_Charming
        Description Wife_is_Charming_desc
        EffectsDescription Wife_is_Charming_effects_desc
        Threshold  2 

        Effect LocalPopularity  1 
        Effect Fertility  1 

    Level Wife_is_Lovely
        Description Wife_is_Lovely_desc
        EffectsDescription Wife_is_Lovely_effects_desc
        Threshold  3 

        Effect LocalPopularity  2 
        Effect Fertility  2 

;------------------------------------------
Trait WifeIsHorrid
    Characters family
    AntiTraits WifeIsCharming

    Level Wife_lacks_Charm
        Description Wife_lacks_Charm_desc
        EffectsDescription Wife_lacks_Charm_effects_desc
        Threshold  1 

        Effect Fertility -1 

    Level Wife_is_Undesireable
        Description Wife_is_Undesireable_desc
        EffectsDescription Wife_is_Undesireable_effects_desc
        Threshold  2 

        Effect LocalPopularity -1 
        Effect Fertility -2

    Level Wife_is_a_Wretch
        Description Wife_is_a_Wretch_desc
        EffectsDescription Wife_is_a_Wretch_effects_desc
        Threshold  3 

        Effect LocalPopularity -2 
        Effect Fertility -3

;------------------------------------------
Trait WifeIsFertile
    Characters family
    AntiTraits WifeIsBarren

    Level Wife_is_Fertile
        Description Wife_is_Fertile_desc
        EffectsDescription Wife_is_Fertile_effects_desc
        Threshold  1 

        Effect Fertility  1 

    Level Wife_is_Very_Fertile
        Description Wife_is_Very_Fertile_desc
        EffectsDescription Wife_is_Very_Fertile_effects_desc
        Threshold  2 

        Effect Fertility  2 

    Level Wife_is_Ripe
        Description Wife_is_Ripe_desc
        EffectsDescription Wife_is_Ripe_effects_desc
        Threshold  3 

        Effect Fertility  3 

;------------------------------------------
Trait WifeIsBarren
    Characters family
    AntiTraits WifeIsFertile

    Level Wife_is_Barren
        Description Wife_is_Barren_desc
        EffectsDescription Wife_is_Barren_effects_desc
        Threshold  1 

        Effect Fertility -1 

    Level Wife_is_Infertile
        Description Wife_is_Infertile_desc
        EffectsDescription Wife_is_Infertile_effects_desc
        Threshold  2 

        Effect Fertility -3 

    Level Wife_is_Cursed
        Description Wife_is_Cursed_desc
        EffectsDescription Wife_is_Cursed_effects_desc
        Threshold  3 

        Effect Fertility -5 

;------------------------------------------
Trait WifeIsWise
    Characters family

    Level Wife_is_Useful
        Description Wife_is_Useful_desc
        EffectsDescription Wife_is_Useful_effects_desc
        Threshold  1 

        Effect Trading  5 
        Effect TaxCollection  5 

    Level Wife_is_Smart
        Description Wife_is_Smart_desc
        EffectsDescription Wife_is_Smart_effects_desc
        Threshold  2 

        Effect Trading  10 
        Effect TaxCollection  10 

    Level Wife_is_Wise
        Description Wife_is_Wise_desc
        EffectsDescription Wife_is_Wise_effects_desc
        Threshold  3 

        Effect Trading  15 
        Effect TaxCollection  15 

;------------------------------------------
Trait WifeIsNoble
    Characters family

    Level Wife_is_Admirable
        Description Wife_is_Admirable_desc
        EffectsDescription Wife_is_Admirable_effects_desc
        Threshold  1 

        Effect LocalPopularity  1 

    Level Wife_is_Noble
        Description Wife_is_Noble_desc
        EffectsDescription Wife_is_Noble_effects_desc
        Threshold  3 

        Effect LocalPopularity  2 

    Level Wife_is_Revered
        Description Wife_is_Revered_desc
        EffectsDescription Wife_is_Revered_effects_desc
        Threshold  5 

        Effect PublicSecurity  1 
        Effect LocalPopularity  3 

;------------------------------------------
Trait WifeIsBitch
    Characters family

    Level Wife_is_Unpleasant
        Description Wife_is_Unpleasant_desc
        EffectsDescription Wife_is_Unpleasant_effects_desc
        Threshold  1 

        Effect LocalPopularity -1 

    Level Wife_is_Nasty
        Description Wife_is_Nasty_desc
        EffectsDescription Wife_is_Nasty_effects_desc
        Threshold  3 

        Effect LocalPopularity -2 

    Level Wife_is_Deplorable
        Description Wife_is_Deplorable_desc
        EffectsDescription Wife_is_Deplorable_effects_desc
        Threshold  5 

        Effect PublicSecurity -1 
        Effect LocalPopularity -3 


;*********  PRINCESS TRAITS  *********
;------------------------------------------
Trait IAmPrincess
    Characters princess
    Hidden

    Level Royal_Princess
        Description Royal_Princess_desc
        EffectsDescription Royal_Princess_effects_desc
        Threshold  1 

        Effect Level  1

;------------------------------------------
Trait NaturalPrincess
    Characters princess

    Level Charming_Consul
        Description Charming_Consul_desc
        EffectsDescription Charming_Consul_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Natural_Negotiator
        Description Natural_Negotiator_desc
        EffectsDescription Natural_Negotiator_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Born_Mediator
        Description Born_Mediator_desc
        EffectsDescription Born_Mediator_effects_desc
        Threshold  3 

        Effect Charm  3 

;------------------------------------------
Trait GoodPrincess
    Characters princess
    AntiTraits BadPrincess

    Level Diplomatic_Ability
        Description Diplomatic_Ability_desc
        EffectsDescription Diplomatic_Ability_effects_desc
        GainMessage Diplomatic_Ability_gain_desc
        Threshold  1 

        Effect Charm  1 

    Level Delicate_Diplomat
        Description Delicate_Diplomat_desc
        EffectsDescription Delicate_Diplomat_effects_desc
        GainMessage Delicate_Diplomat_gain_desc
        Threshold  2 

        Effect Charm  2 

    Level Diplomatic_Weapon
        Description Diplomatic_Weapon_desc
        EffectsDescription Diplomatic_Weapon_effects_desc
        GainMessage Diplomatic_Weapon_gain_desc
        Threshold  3 

        Effect Charm  3 

    Level Mistress_of_Negotiations
        Description Mistress_of_Negotiations_desc
        EffectsDescription Mistress_of_Negotiations_effects_desc
        GainMessage Mistress_of_Negotiations_gain_desc
        Threshold  4 

        Effect Charm  4 

;------------------------------------------
Trait BadPrincess
    Characters princess
    AntiTraits GoodPrincess

    Level Lost_in_Conversation
        Description Lost_in_Conversation_desc
        EffectsDescription Lost_in_Conversation_effects_desc
        Threshold  2 

        Effect Charm -1 

    Level Not_Diplomatic
        Description Not_Diplomatic_desc
        EffectsDescription Not_Diplomatic_effects_desc
        Threshold  4 

        Effect Charm -2 

    Level Royally_Offensive
        Description Royally_Offensive_desc
        EffectsDescription Royally_Offensive_effects_desc
        Threshold  6 

        Effect Charm -3 

;------------------------------------------
Trait PretentiousWoman
    Characters princess
    NoGoingBackLevel  2 
    AntiTraits HumbleWoman

    Level Pretentious
        Description Pretentious_desc
        EffectsDescription Pretentious_effects_desc
        Threshold  1 

        Effect Charm -1 

    Level Utter_Snob
        Description Utter_Snob_desc
        EffectsDescription Utter_Snob_effects_desc
        Epithet Utter_Snob_epithet_desc
        Threshold  2 

        Effect Charm -2 

;------------------------------------------
Trait HumbleWoman
    Characters princess
    AntiTraits PretentiousWoman

    Level Humble
        Description Humble_desc
        EffectsDescription Humble_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Respectful
        Description Respectful_desc
        EffectsDescription Respectful_effects_desc
        Threshold  2 

        Effect Charm  2 

;------------------------------------------
Trait PrettyWoman
    Characters princess
    NoGoingBackLevel  1 
    AntiTraits UglyWoman

    Level Attractive
        Description Attractive_desc
        EffectsDescription Attractive_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Head_Turner
        Description Head_Turner_desc
        EffectsDescription Head_Turner_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Vision_of_Beauty
        Description Vision_of_Beauty_desc
        EffectsDescription Vision_of_Beauty_effects_desc
        Epithet Vision_of_Beauty_epithet_desc
        Threshold  3 

        Effect Charm  3 
        Effect Fertility  1 

;------------------------------------------
Trait UglyWoman
    Characters princess
    NoGoingBackLevel  1 
    AntiTraits PrettyWoman

    Level Flawed_Features
        Description Flawed_Features_desc
        EffectsDescription Flawed_Features_effects_desc
        Threshold  1 

        Effect Charm -1 

    Level Hideous
        Description Hideous_desc
        EffectsDescription Hideous_effects_desc
        Epithet Hideous_epithet_desc
        Threshold  2 

        Effect Charm -2 
        Effect Fertility -1 

;------------------------------------------
Trait BraveWoman
    Characters princess
    AntiTraits TimidWoman

    Level Brave_Woman
        Description Brave_Woman_desc
        EffectsDescription Brave_Woman_effects_desc
        Threshold  1 

        Effect Charm  1 
        Effect PersonalSecurity  1

    Level Dauntless_Woman
        Description Dauntless_Woman_desc
        EffectsDescription Dauntless_Woman_effects_desc
        Threshold  2 

        Effect Charm  2 
        Effect PersonalSecurity 2

;------------------------------------------
Trait TimidWoman
    Characters princess
    AntiTraits BraveWoman

    Level Timid
        Description Timid_desc
        EffectsDescription Timid_effects_desc
        Threshold  2 

        Effect Charm -1 

    Level Skittish
        Description Skittish_desc
        EffectsDescription Skittish_effects_desc
        Threshold  3 

        Effect Charm -2 
        Effect PersonalSecurity  1

    Level Nuerotic
        Description Nuerotic_desc
        EffectsDescription Nuerotic_effects_desc
        Threshold  4 

        Effect Charm -3 
        Effect PersonalSecurity  2

;------------------------------------------
Trait DesperateWoman
    Characters princess
    AntiTraits PrettyWoman, SpiritedWoman

    Level Bruised_Confidence
        Description Bruised_Confidence_desc
        EffectsDescription Bruised_Confidence_effects_desc
        Threshold  2 

        Effect Charm 1 

    Level Insecure
        Description Insecure_desc
        EffectsDescription Insecure_effects_desc
        Threshold  3 

        Effect Charm -2 

    Level Desperate
        Description Desperate_desc
        EffectsDescription Desperate_effects_desc
        Epithet Desperate_epithet_desc
        Threshold  4 

        Effect Charm -3 

;------------------------------------------
Trait SpiritedWoman
    Characters princess
    AntiTraits DesperateWoman

    Level Spirited
        Description Spirited_desc
        EffectsDescription Spirited_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Engaging
        Description Engaging_desc
        EffectsDescription Engaging_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Self-serving
        Description Self-serving_desc
        EffectsDescription Self-serving_effects_desc
        Threshold  3 

        Effect Charm -1 

;------------------------------------------
Trait FaithfulWoman
    Characters princess
    AntiTraits UnchasteWoman

    Level Reliable
        Description Reliable_desc
        EffectsDescription Reliable_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Faithful
        Description Faithful_desc
        EffectsDescription Faithful_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Unquestionably_Loyal
        Description Unquestionably_Loyal_desc
        EffectsDescription Unquestionably_Loyal_effects_desc
        Threshold  4 

        Effect Loyalty  1 
        Effect Charm  2 

;------------------------------------------
Trait UnchasteWoman
    Characters princess
    AntiTraits FaithfulWoman, PassionateWoman

    Level Suggestive
        Description Suggestive_desc
        EffectsDescription Suggestive_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Scarlet_Woman
        Description Scarlet_Woman_desc
        EffectsDescription Scarlet_Woman_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Brazen_Hussy
        Description Brazen_Hussy_desc
        EffectsDescription Brazen_Hussy_effects_desc
        Threshold  3 

        Effect Charm -2 

;------------------------------------------
Trait VapidWoman
    Characters princess
    AntiTraits EducatedWoman

    Level Simplistic
        Description Simplistic_desc
        EffectsDescription Simplistic_effects_desc
        Threshold  1 

        Effect Charm -1 

    Level Vapid
        Description Vapid_desc
        EffectsDescription Vapid_effects_desc
        Threshold  2 

        Effect Charm -2 

    Level Total_Bimbo
        Description Total_Bimbo_desc
        EffectsDescription Total_Bimbo_effects_desc
        Epithet Total_Bimbo_epithet_desc
        Threshold  3 

        Effect Charm -2 

;------------------------------------------
Trait EducatedWoman
    Characters princess
    AntiTraits VapidWoman

    Level Intelligent
        Description Intelligent_desc
        EffectsDescription Intelligent_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Educated
        Description Educated_desc
        EffectsDescription Educated_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Scholarly
        Description Scholarly_desc
        EffectsDescription Scholarly_effects_desc
        Threshold  3 

        Effect Charm  1 

;------------------------------------------
Trait PassionateWoman
    Characters princess
    AntiTraits ColdWoman, UnchasteWoman

    Level Warm
        Description Warm_desc
        EffectsDescription Warm_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Passionate
        Description Passionate_desc
        EffectsDescription Passionate_effects_desc
        Epithet Passionate_epithet_desc
        Threshold  2 

        Effect Charm  1
        Effect Fertility  1  

    Level Insatiable
        Description Insatiable_desc
        EffectsDescription Insatiable_effects_desc
        Threshold  3 

        Effect Charm  2 
        Effect Fertility  -2 

;------------------------------------------
Trait ColdWoman
    Characters princess
    AntiTraits PassionateWoman, UglyWoman

    Level Prudish
        Description Prudish_desc
        EffectsDescription Prudish_effects_desc
        Threshold  1 

        Effect Charm -1 

    Level Cold
        Description Cold_desc
        EffectsDescription Cold_effects_desc
        Threshold  2 

        Effect Charm -2 

    Level Ice_Queen
        Description Ice_Queen_desc
        EffectsDescription Ice_Queen_effects_desc
        Threshold  3 

        Effect Charm 1 
        Effect Fertility -1 

;------------------------------------------
Trait BigotWoman
    Characters princess
    AntiTraits TolerantWoman

    Level Snobbish
        Description Snobbish_desc
        EffectsDescription Snobbish_effects_desc
        Threshold  1 

        Effect Charm -1 

    Level Intolerant
        Description Intolerant_desc
        EffectsDescription Intolerant_effects_desc
        Threshold  2 

        Effect Charm -2 

    Level Despises_Foreigners
        Description Despises_Foreigners_desc
        EffectsDescription Despises_Foreigners_effects_desc
        Threshold  3 

        Effect Charm -3 

;------------------------------------------
Trait TolerantWoman
    Characters princess
    AntiTraits BigotWoman

    Level Tolerant
        Description Tolerant_desc
        EffectsDescription Tolerant_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Accepting
        Description Accepting_desc
        EffectsDescription Accepting_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level Incredibly_Accepting
        Description Incredibly_Accepting_desc
        EffectsDescription Incredibly_Accepting_effects_desc
        Threshold  3 

        Effect Charm  3 

;------------------------------------------
Trait DykeWoman
    Characters princess
    NoGoingBackLevel  2 
    AntiTraits PassionateWoman

    Level Potentially_Confused
        Description Potentially_Confused_desc
        EffectsDescription Potentially_Confused_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Prefers_Women
        Description Prefers_Women_desc
        EffectsDescription Prefers_Women_effects_desc
        Threshold  2 

        Effect Charm -1 
        Effect Fertility -5 

;------------------------------------------
Trait FertileWoman
    Characters princess
    AntiTraits InfertileWoman

    Level Fecund
        Description Fecund_desc
        EffectsDescription Fecund_effects_desc
        Threshold  1 

        Effect Fertility  1 

    Level Feracious
        Description Feracious_desc
        EffectsDescription Feracious_effects_desc
        Threshold  2 

        Effect Fertility  2 

    Level Always_Ripe
        Description Always_Ripe_desc
        EffectsDescription Always_Ripe_effects_desc
        Threshold  3 

        Effect Fertility  3 

;------------------------------------------
Trait InfertileWoman
    Characters princess
    AntiTraits FertileWoman

    Level Infecund
        Description Infecund_desc
        EffectsDescription Infecund_effects_desc
        Threshold  1 

        Effect Fertility -2 

    Level Unprolific
        Description Unprolific_desc
        EffectsDescription Unprolific_effects_desc
        Threshold  2 

        Effect Fertility -3

    Level Sterile
        Description Sterile_desc
        EffectsDescription Sterile_effects_desc
        Threshold  3 

        Effect Fertility -4

;------------------------------------------
Trait FairWoman
    Characters princess
    AntiTraits HarshWoman

    Level Just_and_Fair
        Description Just_and_Fair_desc
        EffectsDescription Just_and_Fair_effects_desc
        Threshold  1 

        Effect Charm  1 

    Level Publically_Loved
        Description Publically_Loved_desc
        EffectsDescription Publically_Loved_effects_desc
        Threshold  2 

        Effect Charm  2 

    Level People's_Princess
        Description People's_Princess_desc
        EffectsDescription People's_Princess_effects_desc
        Threshold  3 

        Effect Charm  3 

;------------------------------------------
Trait HarshWoman
    Characters princess
    AntiTraits FairWoman

    Level Hard_But_Fair
        Description Hard_But_Fair_desc
        EffectsDescription Hard_But_Fair_effects_desc
        Threshold  1 

        Effect Charm -1 

    Level Harsh_Mistress
        Description Harsh_Mistress_desc
        EffectsDescription Harsh_Mistress_effects_desc
        Threshold  2 

        Effect Charm -2 

    Level Cruel_Mistress
        Description Cruel_Mistress_desc
        EffectsDescription Cruel_Mistress_effects_desc
        Threshold  3 

        Effect Charm -3 


;*********  HEREDITY TRAITS  *********

;------------------------------------------
Trait BiologicalSon
    Characters family
    AntiTraits BastardSon
    
    Level BiologicalSon
        Description BiologicalSon_desc
        EffectsDescription BiologicalSon_effects_desc
        Threshold  1

;------------------------------------------
Trait BastardSon
    Characters family
    AntiTraits BiologicalSon    
    
    Level BastardSon
        Description BastardSon_desc
        EffectsDescription BastardSon_effects_desc
        Epithet BastardSon_epithet_desc
        Threshold  1

        Effect LocalPopularity  -1

;------------------------------------------
Trait BastardDaughter
    Characters princess

    Level BastardDaughter
        Description BastardDaughter_desc
        EffectsDescription BastardDaughter_effects_desc
        Threshold  1

        Effect Charm  -1

;------------------------------------------
Trait SonofKingPrince
    Characters family
    Hidden
    
    Level SonofKingPrince
        Description SonofKingPrince_desc
        EffectsDescription SonofKingPrince_effects_desc
        Threshold  1

;------------------------------------------
Trait DaughterofKingPrince
    Characters princess
    Hidden
    
    Level DaughterofKingPrince
        Description DaughterofKingPrince_desc
        EffectsDescription DaughterofKingPrince_effects_desc
        Threshold  1

;------------------------------------------
Trait Hates_Father
    Characters family
    AntiTraits Loves_Father

  Level Hatedad1
       Description Hatedad1_desc
        EffectsDescription Hatedad1_effects_desc
        Threshold 1

    Effect Loyalty -1

  Level Hatedad2
       Description Hatedad2_desc
        EffectsDescription Hatedad2_effects_desc
        Threshold 3

    Effect Loyalty -2

;------------------------------------------
Trait Loves_Father
    Characters family
    AntiTraits Hates_Father

  Level Lovedad1
       Description Lovedad1_desc
        EffectsDescription Lovedad1_effects_desc
        Threshold 1

    Effect Loyalty 1

  Level Lovedad2
       Description Lovedad2_desc
        EffectsDescription Lovedad2_effects_desc
        Threshold 3

    Effect Loyalty 2

;------------------------------------------
Trait Badblood
    Characters family

  Level Badblood
    Description Badblood_desc
        EffectsDescription Badblood_effects_desc
        Threshold 1

    Effect Command -1
    Effect TroopMorale -1
    Effect Unrest 3

;------------------------------------------
Trait Poulains
    Characters family
    ExcludeCultures middle_eastern, mesoamerican, greek

  Level Poulains
    Description Poulains_desc
        EffectsDescription Poulains_effects_desc
        Threshold 1

    Effect Loyalty -1
    Effect Chivalry 1


;*********  HEALTH SYSTEM  *********
;------------------------------------------
Trait HaleAndHearty
    Characters family
    
    Level DeathlyUnhealthy
        Description DeathlyUnhealthy_desc
        EffectsDescription DeathlyUnhealthy_effects_desc
        Threshold  1

        Effect HitPoints  -3
        Effect Fertility -1

    Level SeverelyUnhealthy
        Description SeverelyUnhealthy_desc
        EffectsDescription SeverelyUnhealthy_effects_desc
        Threshold  4

        Effect HitPoints  -2

    Level Unhealthy
        Description Unhealthy_desc
        EffectsDescription Unhealthy_effects_desc
        Threshold  9

        Effect HitPoints  -1

    Level NormalHealth
        Description NormalHealth_desc
        EffectsDescription NormalHealth_effects_desc
        Threshold  12

    Level Healthy
        Description Healthy_desc
        EffectsDescription Healthy_effects_desc
        Threshold  15

        Effect HitPoints  1

    Level FairlyHealthy
        Description FairlyHealthy_desc
        EffectsDescription FairlyHealthy_effects_desc
        Threshold  20

        Effect HitPoints  2

    Level BastionHealth
        Description BastionHealth_desc
        EffectsDescription BastionHealth_effects_desc
        Threshold  25

        Effect HitPoints  3
        Effect Fertility 1
        Effect TroopMorale 1

;------------------------------------------
Trait Diseased
    Characters family
    Hidden
    AntiTraits Healed
    
    Level Diseased
        Description Diseased_desc
        EffectsDescription Diseased_effects_desc
        Threshold  1

;------------------------------------------
Trait Pneumonia
    Characters family
    AntiTraits Healed
    
    Level Pneumonia
        Description Pneumonia_desc
        EffectsDescription Pneumonia_effects_desc
        GainMessage Pneumonia_gain_desc
        Threshold  1

        Effect Command  -1
        Effect TroopMorale -2
        Effect MovementPoints  -2
        Effect HitPoints -2
        Effect Piety -1

;------------------------------------------
Trait PneumoniaEncounter
    Characters family
    Hidden
    
    Level PneumoniaEncounter
        Description PneumoniaEncounter_desc
        EffectsDescription PneumoniaEncounter_effects_desc
        Threshold  3

;------------------------------------------
Trait Leprosy
    Characters family
    
    Level Leprosy
        Description Leprosy_desc
        EffectsDescription Leprosy_effects_desc
        GainMessage Leprosy_gain_desc
        Epithet Leprosy_epithet_desc
        Threshold  1
      
        Effect Command -3
        Effect TroopMorale  -2 
        Effect MovementPoints  -5
        Effect HitPoints -3
        Effect LocalPopularity  -2
        Effect Piety -2

;------------------------------------------
Trait Scurvy
    Characters family
    AntiTraits Healed
    
    Level Scurvy
        Description Scurvy_desc
        EffectsDescription Scurvy_effects_desc
        GainMessage Scurvy_gain_desc
        Threshold  1

        Effect MovementPoints  -1
        Effect HitPoints -1
        Effect Piety -1

;------------------------------------------
Trait ScurvyEncounter
    Characters family
    Hidden
    
    Level ScurvyEncounter
        Description ScurvyEncounter_desc
        EffectsDescription ScurvyEncounter_effects_desc
        Threshold  3

;------------------------------------------
Trait Healed
    Characters family
    Hidden
    AntiTraits Pneumonia, Scurvy, Diseased
    
    Level Healed
        Description Healed_desc
        EffectsDescription Healed_effects_desc
        GainMessage Healed_gain_desc
        Threshold  1

        Effect Piety 1

;------------------------------------------
Trait Robust
    Characters family
    AntiTraits Sickly
    
    Level Robust
        Description Robust_desc
        EffectsDescription Robust_effects_desc
        Threshold  1

        Effect HitPoints 1

;------------------------------------------
Trait Sickly
    Characters family
    AntiTraits Robust
    
    Level Sickly
        Description Sickly_desc
        EffectsDescription Sickly_effects_desc
        Threshold  1

        Effect HitPoints -1

;------------------------------------------
Trait RobustPrincess
    Characters princess
    AntiTraits SicklyPrincess
    
    Level RobustPrincess
        Description RobustPrincess_desc
        EffectsDescription RobustPrincess_effects_desc
        Threshold  1

        Effect MovementPoints 1

;------------------------------------------
Trait SicklyPrincess
    Characters princess
    AntiTraits RobustPrincess
    
    Level SicklyPrincess
        Description SicklyPrincess_desc
        EffectsDescription SicklyPrincess_effects_desc
        Threshold  1

        Effect MovementPoints -1


;*********  LOYALTY SYSTEM  *********
;------------------------------------------
Trait KingsAuthority
    Characters family
    Hidden
    AntiTraits KingsAuthorityReset

    Level auth1
    Description auth1_desc
        EffectsDescription auth1_effects_desc
        Threshold 1

        Effect Authority 1

    Level auth2
    Description auth2_desc
        EffectsDescription auth2_effects_desc
        Threshold 2

        Effect Authority 2

    Level auth3
    Description auth3_desc
        EffectsDescription auth3_effects_desc
        Threshold 3

        Effect Authority 3

    Level auth4
    Description auth4_desc
        EffectsDescription auth4_effects_desc
        Threshold 4

        Effect Authority 4

    Level auth5
    Description auth5_desc
        EffectsDescription auth5_effects_desc
        Threshold 5

        Effect Authority 5

    Level auth6
    Description auth6_desc
        EffectsDescription auth6_effects_desc
        Threshold 6

        Effect Authority 6

    Level auth7
    Description auth7_desc
        EffectsDescription auth7_effects_desc
        Threshold 7

    Effect Authority 7

    Level auth8
    Description auth8_desc
        EffectsDescription auth8_effects_desc
        Threshold 8

        Effect Authority 8

    Level auth9
    Description auth9_desc
        EffectsDescription auth9_effects_desc
        Threshold 9

        Effect Authority 9

;------------------------------------------
Trait KingsAuthorityReset
    Characters family
    Hidden
    AntiTraits KingsAuthority

    Level auth1Reset
    Description auth1Reset_desc
        EffectsDescription auth1Reset_effects_desc
        Threshold 1
;------------------------------------------
Trait Near_Loyalty
    Characters family
    AntiTraits Far_Loyalty

    Level Trusted
        Description Trusted_desc
        EffectsDescription Trusted_effects_desc
        GainMessage Trusted_gain_desc
        Threshold 1

        Effect Loyalty 1

    Level Trusted1
        Description Trusted1_desc
        EffectsDescription Trusted1_effects_desc
        GainMessage Trusted1_gain_desc
        Threshold 4

        Effect Loyalty 2
        Effect TroopMorale 1

;------------------------------------------
Trait Far_Loyalty
    Characters family
    AntiTraits Near_Loyalty

    Level Tempted
        Description Tempted_desc
        EffectsDescription Tempted_effects_desc
        GainMessage Tempted_gain_desc
        Threshold 1

        Effect Loyalty -1
        Effect TroopMorale -1

    Level Tempted1
        Description Tempted1_desc
        EffectsDescription Tempted1_effects_desc
        GainMessage Tempted1_gain_desc
        Threshold 4

        Effect Loyalty -2
        Effect TroopMorale -2

    Level Tempted2
        Description Tempted2_desc
        EffectsDescription Tempted2_effects_desc
        GainMessage Tempted2_gain_desc
        Threshold 10

        Effect Loyalty -4
        Effect TroopMorale 2
        Effect PersonalSecurity 1

;------------------------------------------
Trait Obedient
    Characters family
    AntiTraits Disobedient

  Level Obedient1
    Description Obedient1_desc
        EffectsDescription Obedient1_effects_desc
        Threshold 1

        Effect Loyalty 2

  Level Obedient2
    Description Obedient2_desc
        EffectsDescription Obedient2_effects_desc
        Threshold 2

        Effect Loyalty 4

;------------------------------------------
Trait Disobedient
    Characters family
    AntiTraits Obedient

  Level Disobedient1
    Description Disobedient1_desc
        EffectsDescription Disobedient1_effects_desc
        Threshold 1

        Effect Loyalty -3
        Effect Command -2
        Effect TroopMorale -2
        Effect Unrest 5
        Effect Squalor 2

  Level Disobedient2
    Description Disobedient2_desc
        EffectsDescription Disobedient2_effects_desc
        Threshold 2

        Effect Loyalty -10
        Effect Command 2
        Effect TroopMorale 3
        Effect Law -10
        Effect Unrest 80
        Effect Squalor 80
        Effect LocalPopularity  -5

;------------------------------------------
Trait Locked
    Characters family

  Level Locked
    Description Locked_desc
        EffectsDescription Locked_effects_desc
        Threshold 1

        Effect MovementPoints -120

;------------------------------------------
Trait ExRebel
    Characters family

    Level Rebelled
        Description Rebelled_desc
        EffectsDescription Rebelled_effects_desc
        Threshold  1 

        Effect Loyalty -1 

    Level Rebelious
        Description Rebelious_desc
        EffectsDescription Rebelious_effects_desc
        Threshold  2 

        Effect Loyalty -2 

    Level Turncoat
        Description Turncoat_desc
        EffectsDescription Turncoat_effects_desc
        Epithet Turncoat_epithet_desc
        Threshold  3 

        Effect Loyalty -3

;------------------------------------------
Trait Titled
    Characters family
    Hidden
    AntiTraits Untitled

    Level Titled
        Description Titled_desc
        EffectsDescription Titled_effects_desc
        Threshold 1

;------------------------------------------
Trait Untitled
    Characters family
    Hidden
    AntiTraits Titled

    Level Untitled
        Description Untitled_desc
        EffectsDescription Untitled_effects_desc
        Threshold 1

;------------------------------------------
Trait Stripped
    Characters family

    Level Stripped
        Description Stripped_desc
        EffectsDescription Stripped_effects_desc
        Threshold 1

    Effect Loyalty -1

    Level Stripped_again
        Description Stripped_again_desc
        EffectsDescription Stripped_again_effects_desc
        Threshold 2

        Effect Loyalty -3

;------------------------------------------
Trait Offensive_To_Nobles
    Characters family

  Level Offensive1
    Description Offensive1_desc
        EffectsDescription Offensive1_effects_desc
        GainMessage Offensive1_gain_desc
        Threshold 1

        Effect LocalPopularity  -1 

  Level Offensive2
    Description Offensive2_desc
        EffectsDescription Offensive2_effects_desc
        GainMessage Offensive2_gain_desc
        LoseMessage Offensive2_lose_desc
        Threshold 2

        Effect LocalPopularity  -2


;*********  AGENT TRAITS  *********
;------------------------------------------
Trait AssassinCareer
    Characters assassin
    
    Level GreatKill
        Description GreatKill_desc
        EffectsDescription GreatKill_effects_desc
        Threshold  1

        Effect Subterfuge  1

    Level AwesomeKill
        Description AwesomeKill_desc
        EffectsDescription AwesomeKill_effects_desc
        Threshold  3

        Effect Subterfuge  3

    Level LegendaryKill
        Description LegendaryKill_desc
        EffectsDescription LegendaryKill_effects_desc
        Epithet LegendaryKill_epithet_desc
        Threshold  5

        Effect Subterfuge  5

;------------------------------------------
Trait DiplomatCareer
    Characters diplomat
    
    Level OrchestrateAlliance
        Description OrchestrateAlliance_desc
        EffectsDescription OrchestrateAlliance_effects_desc
        Threshold  1

        Effect Influence  1

    Level NetworkAlliance
        Description NetworkAlliance_desc
        EffectsDescription NetworkAlliance_effects_desc
        Threshold  3

        Effect Influence  2

;------------------------------------------
Trait MerchantExoticPure
    Characters merchant
    AntiTraits MerchantExoticCorrupt
    
    Level MerchantExoticPure
        Description MerchantExoticPure_desc
        EffectsDescription MerchantExoticPure_effects_desc
        Threshold  1

        Effect Finance  1

;------------------------------------------
Trait MerchantExoticCorrupt
    Characters merchant
    AntiTraits MerchantExoticPure
    
    Level MerchantExoticCorrupt
        Description MerchantExoticCorrupt_desc
        EffectsDescription MerchantExoticCorrupt_effects_desc
        Threshold  1

        Effect Finance  -1

;------------------------------------------
Trait SpyCareer
    Characters spy
    
    Level NoviceInfiltrate
        Description NoviceInfiltrate_desc
        EffectsDescription NoviceInfiltrate_effects_desc
        Threshold  1

        Effect Subterfuge  1

    Level ExpertInfiltrate
        Description ExpertInfiltrate_desc
        EffectsDescription ExpertInfiltrate_effects_desc
        Threshold  3

        Effect Subterfuge  2

    Level LegendaryInfiltrate
        Description LegendaryInfiltrate_desc
        EffectsDescription LegendaryInfiltrate_effects_desc
        Epithet LegendaryInfiltrate_epithet_desc
        Threshold  5

        Effect Subterfuge  3

;------------------------------------------
Trait PriestCatholicDoctrine
    Characters priest
    AntiTraits OpenMinded
    
    Level PriestCatholicDoctrine
        Description PriestCatholicDoctrine_desc
        EffectsDescription PriestCatholicDoctrine_effects_desc
        Threshold  1

        Effect Purity  1

;------------------------------------------
Trait PriestIslamicDoctrine
    Characters priest
    AntiTraits OpenMinded
    
    Level PriestIslamicDoctrine
        Description PriestIslamicDoctrine_desc
        EffectsDescription PriestIslamicDoctrine_effects_desc
        Threshold  1

        Effect Purity  1

;------------------------------------------
Trait PriestOrthodoxDoctrine
    Characters priest
    AntiTraits OpenMinded
    
    Level PriestOrthodoxDoctrine
        Description PriestOrthodoxDoctrine_desc
        EffectsDescription PriestOrthodoxDoctrine_effects_desc
        Threshold  1

        Effect Purity  1  


;*********  KINGDOM TRAITS - pending ********* 
;------------------------------------------
Trait RulerofSicily
    Characters family

    Level RulerofSicily
        Description RulerofSicily_desc
        EffectsDescription RulerofSicily_effects_desc
        Threshold  1 


;*********  KINGDOM BONUSES  ********* 
;------------------------------------------
Trait RulerofSicilyBonus
    Characters admiral 

    Level RulerofSicilyBonus
        Description RulerofSicilyBonus_desc
        EffectsDescription RulerofSicilyBonus_effects_desc
        Threshold  1 

        Effect MovementPoints  1

;*********  EDUCATION TRAITS  *********
;the following traits can be gained through Education

;------------------------------------------
Trait Educated_Authority
    Characters family
    Hidden

    Level Educated1
    Description Educated1_desc
        EffectsDescription Educated1_effects_desc
        Threshold 1

    Level Educated2
    Description Educated2_desc
        EffectsDescription Educated2_effects_desc
        Threshold 1

;------------------------------------------
;general education for counter for 16-21
;hidden trait as titles make no sense for medieval period
Trait Wantschool
    Characters family
;    Hidden

    Level Graduate
        Description Graduate_desc
        EffectsDescription Graduate_effects_desc
        Threshold 1

    Level Senior
        Description Senior_desc
        EffectsDescription Senior_effects_desc
        Threshold 2

    Level Junior
        Description Junior_desc
        EffectsDescription Junior_effects_desc
        Threshold 3

    Level Sophomore
        Description Sophomore_desc
        EffectsDescription Sophomore_effects_desc
        Threshold 4

    Level Freshman
        Description Freshman_desc
        EffectsDescription Freshman_effects_desc
        Threshold 5

    Level Kindergarten
        Description Kindergarten_desc
        EffectsDescription Kindergarten_effects_desc
        Threshold 6

;------------------------------------------
;Trait applied at ComesOfAge, so some characters want more education
Trait WantsHigherEd
    Characters family

    Level HighEd
        Description HighEd_desc
        EffectsDescription HighEd_effects_desc
        Threshold 1

;------------------------------------------
;Some charcters make good governors, some good military people 
;add to conditions of 25% of triggers so although you can be good
;at both, its eaiser to be great at one
Trait MilitaryInclination
    Characters family

    Level Military_Minded
        Description Military_Minded_desc
        EffectsDescription Military_Minded_effects_desc
        Threshold 1

;------------------------------------------
Trait GovernorInclination
    Characters family

    Level Governor_Minded
        Description Governor_Minded_desc
        EffectsDescription Governor_Minded_effects_desc
        Threshold 1

;------------------------------------------
Trait Military_Edu
    Characters family

    Level Basic_Military_Ed
        Description Basic_Military_Ed_desc
        EffectsDescription Basic_Military_Ed_effects_desc
        Threshold 1

        Effect MovementPoints 1

    Level Standard_Military_Ed
        Description Standard_Military_Ed_desc
        EffectsDescription Standard_Military_Ed_effects_desc
        Threshold 2

        Effect Command 1
        Effect Loyalty 1
        Effect SiegeEngineering 5
        Effect MovementPoints 2

    Level Advanced_Military_Ed
        Description Advanced_Military_Ed_desc
        EffectsDescription Advanced_Military_Ed_effects_desc
        Threshold 5

        Effect Command 2
        Effect SiegeEngineering 10
        Effect TroopMorale 1
        Effect LineOfSight 1
        Effect Ambush  2
        Effect Loyalty 1
        Effect MovementPoints 3

    Level Master_Military_Ed
        Description Master_Military_Ed_desc
        EffectsDescription Master_Military_Ed_effects_desc
        Threshold 10

        Effect Command 3
        Effect SiegeEngineering 15
        Effect TroopMorale 2
        Effect LineOfSight 1
        Effect Ambush  3
        Effect Loyalty -1
        Effect MovementPoints 3

;------------------------------------------
Trait Western_Edu
    Characters family

    Level Basic_Western_Ed
        Description Basic_Western_Ed_desc
        EffectsDescription Basic_Western_Ed_effects_desc
        Threshold 1

        Effect SiegeEngineering 5 
        Effect Trading  2
        Effect TaxCollection 5

    Level Standard_Western_Ed
        Description Standard_Western_Ed_desc
        EffectsDescription Standard_Western_Ed_effects_desc
        Threshold 3

        Effect SiegeEngineering 5 
        Effect Trading  5
        Effect TaxCollection 5
        Effect Mining  5 
        Effect Construction 5
        Effect Loyalty -1

    Level Advanced_Western_Ed
        Description Advanced_Western_Ed_desc
        EffectsDescription Advanced_Western_Ed_effects_desc
        Threshold 10

        Effect SiegeEngineering 5 
        Effect Trading  10
        Effect TaxCollection 10
        Effect Mining  10 
        Effect Construction 10
        Effect Loyalty -2
        Effect Law 2
        Effect BattleSurgery  5
        Effect Piety 2

;------------------------------------------
Trait Eastern_Edu
    Characters family

    Level Basic_Eastern_Ed
        Description Basic_Eastern_Ed_desc
        EffectsDescription Basic_Eastern_Ed_effects_desc
        Threshold 1

        Effect SiegeEngineering 5 
        Effect Piety  1
        Effect TaxCollection 5
        Effect LocalPopularity  1 

    Level Standard_Eastern_Ed
        Description Standard_Eastern_Ed_desc
        EffectsDescription Standard_Eastern_Ed_effects_desc
        Threshold 3

        Effect SiegeEngineering 5 
        Effect Piety  2
        Effect TaxCollection 5
        Effect LocalPopularity  1 
        Effect Mining  5 
        Effect Construction 5
        Effect Trading 1

    Level Advanced_Eastern_Ed
        Description Advanced_Eastern_Ed_desc
        EffectsDescription Advanced_Eastern_Ed_effects_desc
        Threshold 10

        Effect SiegeEngineering 5 
        Effect Piety  3
        Effect TaxCollection 10
        Effect LocalPopularity  2 
        Effect Mining  10 
        Effect Construction 10
        Effect Trading 5
        Effect Loyalty -1
        Effect Law 2

;------------------------------------------
Trait Greek_Edu
    Characters family

    Level Basic_Greek_Ed
        Description Basic_Greek_Ed_desc
        EffectsDescription Basic_Greek_Ed_effects_desc
        Threshold 1

        Effect SiegeEngineering 5 
        Effect Trading  2
        Effect Law  1
        Effect TaxCollection 5

    Level Standard_Greek_Ed
        Description Standard_Greek_Ed_desc
        EffectsDescription Standard_Greek_Ed_effects_desc
        Threshold 3

        Effect SiegeEngineering 5 
        Effect Trading  5
        Effect Law  1
        Effect TaxCollection 5
        Effect Mining  5 
        Effect Construction 5

    Level Advanced_Greek_Ed
        Description Advanced_Greek_Ed_desc
        EffectsDescription Advanced_Greek_Ed_effects_desc
        Threshold 10

        Effect SiegeEngineering 5 
        Effect Trading  10
        Effect Law  2
        Effect TaxCollection 5
        Effect Mining  5 
        Effect Construction 10
        Effect BattleSurgery  5
        Effect Piety 1

;------------------------------------------
Trait Pagan_Edu
    Characters family

    Level Basic_Pagan_Ed
        Description Basic_Pagan_Ed_desc
        EffectsDescription Basic_Pagan_Ed_effects_desc
        Threshold 1

        Effect MovementPoints 1
        Effect LineOfSight 1

    Level Standard_Pagan_Ed
        Description Standard_Pagan_Ed_desc
        EffectsDescription Standard_Pagan_Ed_effects_desc
        Threshold 2

        Effect Command 1
        Effect Loyalty 1
        Effect LineOfSight 1
        Effect MovementPoints 2
        Effect TroopMorale 1
        Effect Ambush  1

    Level Advanced_Pagan_Ed
        Description Advanced_Pagan_Ed_desc
        EffectsDescription Advanced_Pagan_Ed_effects_desc
        Threshold 4

        Effect Command 2
        Effect Loyalty 1
        Effect LineOfSight 1
        Effect MovementPoints 3
        Effect TroopMorale 1
        Effect Ambush  2
        Effect Law  1
        Effect TaxCollection 5

    Level Master_Pagan_Ed
        Description Master_Pagan_Ed_desc
        EffectsDescription Master_Pagan_Ed_effects_desc
        Threshold 8

        Effect Command 3
        Effect Loyalty -2
        Effect LineOfSight 1
        Effect MovementPoints 3
        Effect TroopMorale 2
        Effect Ambush  3
        Effect Law  1
        Effect TaxCollection 5

;------------------------------------------
Trait MedicalSkill
    Characters family

    Level Medical_Training
        Description Medical_Training_desc
        EffectsDescription Medical_Training_effects_desc
        Threshold  1 

        Effect BattleSurgery 5 

;------------------------------------------
Trait Poet
    Characters family

    Level Poet
        Description Poet_desc
        EffectsDescription Poet_effects_desc
        Threshold  1 

        Effect LocalPopularity 1 
        Effect TaxCollection  -1

;------------------------------------------
;record if has ancillary with type=academic for x turns
;then can check this trait for ComesOfAge for children

Trait AncillaryTeacher
    Characters family

    Level Inspiring_Teacher
        Description Inspiring_Teacher_desc
        EffectsDescription Inspiring_Teacher_effects_desc
        Threshold  10 

;------------------------------------------
Trait Ai_MoveFix
    Characters family
    Hidden

    Level Ai_MoveFix1
        Description Ai_MoveFix1_desc
        EffectsDescription Ai_MoveFix1_effects_desc
        Threshold  1 

        Effect MovementPoints  25

;------------------------------------------
Trait MathematicsSkill
    Characters family
    NoGoingBackLevel  1 
    AntiTraits Ignorance

    Level Talent_with_Numbers
        Description Talent_with_Numbers_desc
        EffectsDescription Talent_with_Numbers_effects_desc
        Threshold  1 

        Effect SiegeEngineering 10 
        Effect Trading  5 
        Effect Construction 5

;------------------------------------------
Trait InspiringSpeaker
    Characters family
    NoGoingBackLevel  2 
    AntiTraits BoringSpeaker

    Level Can_Tell_a_Tale
        Description Can_Tell_a_Tale_desc
        EffectsDescription Can_Tell_a_Tale_effects_desc
        Threshold  1 

        Effect Law  1 

    Level Great_Speaker
        Description Great_Speaker_desc
        EffectsDescription Great_Speaker_effects_desc
        Threshold  2 

        Effect Law  2 
        Effect TroopMorale  1 

    Level Inspirational_Speaker
        Description Inspirational_Speaker_desc
        EffectsDescription Inspirational_Speaker_effects_desc
        Epithet Inspirational_Speaker_epithet_desc
        Threshold  4 

        Effect Law  2 
        Effect TroopMorale  2 
        Effect Command  1
 
;------------------------------------------
Trait BoringSpeaker
    Characters family
    NoGoingBackLevel  2 
    AntiTraits InspiringSpeaker

    Level Poor_Speaker
        Description Poor_Speaker_desc
        EffectsDescription Poor_Speaker_effects_desc
        Threshold  1 

        Effect Law -1 

    Level Awkward_Speaker
        Description Awkward_Speaker_desc
        EffectsDescription Awkward_Speaker_effects_desc
        Threshold  2 

        Effect Law -1 
        Effect TroopMorale -1 

    Level Incredibly_Boring
        Description Incredibly_Boring_desc
        EffectsDescription Incredibly_Boring_effects_desc
        Threshold  4 

        Effect Law -2 
        Effect TroopMorale -2 
        Effect Command -1 

;------------------------------------------
Trait Cultured
    Characters family

    Level Cultured
        Description Cultured_desc
        EffectsDescription Cultured_effects_desc
        Threshold  1 

        Effect LocalPopularity  1 

    Level Very_Cultured
        Description Very_Cultured_desc
        EffectsDescription Very_Cultured_effects_desc
        Threshold  3 

        Effect LocalPopularity  2
        Effect TroopMorale -1 

;------------------------------------------
Trait RhetoricSkill
    Characters family
    NoGoingBackLevel  1 
    AntiTraits Ignorance, BoringSpeaker

    Level Well_Spoken
        Description Well_Spoken_desc
        EffectsDescription Well_Spoken_effects_desc
        Threshold  1 

        Effect Authority  1 

    Level Stylish_Debater
        Description Stylish_Debater_desc
        EffectsDescription Stylish_Debater_effects_desc
        Threshold  2 

        Effect Authority  2 

    Level Prone_to_Rhetoric
        Description Prone_to_Rhetoric_desc
        EffectsDescription Prone_to_Rhetoric_effects_desc
        Threshold  5 

        Effect Authority -1 

;------------------------------------------
Trait Rabblerouser
    Characters family
    NoGoingBackLevel  1 

    Level Instigator
        Description Instigator_desc
        EffectsDescription Instigator_effects_desc
        Threshold  1 

        Effect LocalPopularity  1 

    Level Agitator
        Description Agitator_desc
        EffectsDescription Agitator_effects_desc
        Threshold  2 

        Effect LocalPopularity  2 

    Level Provoker
        Description Provoker_desc
        EffectsDescription Provoker_effects_desc
        Threshold  4 

        Effect LocalPopularity  3 
        Effect Unrest  1 

    Level Leader_of_the_Mob
        Description Leader_of_the_Mob_desc
        EffectsDescription Leader_of_the_Mob_effects_desc
        Threshold  8 

        Effect LocalPopularity  4 
        Effect Unrest  2 

;------------------------------------------
Trait PoliticsSkill
    Characters family
    NoGoingBackLevel  1 

    Level Political_Promise
        Description Political_Promise_desc
        EffectsDescription Political_Promise_effects_desc
        Threshold  1 

        Effect Authority  1 

    Level Political_Animal
        Description Political_Animal_desc
        EffectsDescription Political_Animal_effects_desc
        Threshold  2 

        Effect Authority  2 

    Level Perfect_Politician
        Description Perfect_Politician_desc
        EffectsDescription Perfect_Politician_effects_desc
        Threshold  3 

        Effect Authority  3 

;============== MILITARISTIC TRAITS  =============
;------------------------------------------
Trait Humane
    Characters family
    NoGoingBackLevel 1
    AntiTraits Hardened

  Level Humane
       Description Humane_desc
        EffectsDescription Humane_effects_desc
        Threshold 1

        Effect Command -1
        Effect HitPoints -1
        Effect Piety 1

  Level Humane2
        Description Humane2_desc
        EffectsDescription Humane2_effects_desc
        Threshold 4

        Effect Command -2
        Effect TroopMorale -1
        Effect Loyalty -1
        Effect HitPoints  -1
        Effect Piety 3

  Level Humane3
        Description Humane3_desc
        EffectsDescription Humane3_effects_desc
        Epithet Humane3_epithet_desc
        Threshold 8

        Effect Command 1
        Effect Piety 1

;------------------------------------------
Trait Hardened
    Characters family
    NoGoingBackLevel 1
    AntiTraits Humane

  Level Hardened
        Description Hardened_desc
        EffectsDescription Hardened_effects_desc
        Threshold 1

        Effect HitPoints  1

  Level Hardened2
        Description Hardened2_desc
        EffectsDescription Hardened2_effects_desc
        Threshold 4

        Effect Command 1
        Effect HitPoints  1
        Effect Piety -1

  Level Hardened3
        Description Hardened3_desc
        EffectsDescription Hardened3_effects_desc
        Epithet Hardened3_epithet_desc
        Threshold 8

        Effect HitPoints 2
        Effect TroopMorale -2
        Effect Piety -2
        Effect Chivalry -1

;------------------------------------------
Trait SeverelyWounded
    Characters family

    Level SeverelyWounded
        Description SeverelyWounded_desc
        EffectsDescription SeverelyWounded_effects_desc
        GainMessage SeverelyWounded_gain_desc
        Threshold  1

        Effect MovementPoints  -2
        Effect HitPoints -2


;*********  MISC TRAITS  *********
;------------------------------------------
Trait FactionFutureRegent
    Characters family
    AntiTraits Exheir

    Level FactionFutureRegent
        Description FactionFutureRegent_desc
        EffectsDescription FactionFutureRegent_effects_desc
        Threshold  1 
 
        Effect PersonalSecurity  1

;------------------------------------------
Trait FactionRegent
    Characters family

    Level FactionRegent
        Description FactionRegent_desc
        EffectsDescription FactionRegent_effects_desc
        Threshold  1 

        Effect Command  1
        Effect PersonalSecurity  2

;------------------------------------------
Trait NoHeirYet
    Characters family

    Level NoHeirYet
        Description NoHeirYet_desc
        EffectsDescription NoHeirYet_effects_desc
        Threshold  1 

        Effect Authority  -2
        Effect LocalPopularity  -1

;------------------------------------------
Trait EnviousOfHeir
    Characters family

    Level EnviousOfHeir
        Description EnviousOfHeir_desc
        EffectsDescription EnviousOfHeir_effects_desc
        Threshold  1 

        Effect Loyalty  -1

;------------------------------------------
Trait Excommunication
    Characters family
    AntiTraits Reconciliation, ExcommunicationJoke
    
    Level Excommunication
        Description Excommunication_desc
        EffectsDescription Excommunication_effects_desc
        Threshold  1

        Effect Authority  -2
        Effect Piety  -2
        Effect LocalPopularity  -3

;------------------------------------------
Trait ExcommunicationJoke
    Characters family
    AntiTraits Reconciliation, Excommunication
    
    Level ExcommunicationJoke
        Description ExcommunicationJoke_desc
        EffectsDescription ExcommunicationJoke_effects_desc
        Threshold  1

        Effect Combat_V_Faction_Papal_States  1
        Effect Piety  -2
        Effect LocalPopularity  -2

;------------------------------------------
Trait Reconciliation
    Characters family
    Hidden
    AntiTraits Excommunication, ExcommunicationJoke
    
    Level Reconciliation
        Description Reconciliation_desc
        EffectsDescription Reconciliation_effects_desc
        Threshold  1  

;------------------------------------------
Trait RivalConquer_Constantinople
    Characters family
    ExcludeCultures greek
    AntiTraits RivalConquer_Constantinople1

    Level RivalConquer_Constantinople
        Description RivalConquer_Constantinople_desc
        EffectsDescription RivalConquer_Constantinople_effects_desc
        GainMessage RivalConquer_Constantinople_gain_desc
        Threshold 1

        Effect Command 2
        Effect Authority 2
        Effect TroopMorale 1

;------------------------------------------
Trait GreekConquer_Constantinople
    Characters family
    ExcludeCultures northern_european, southern_european, eastern_european, middle_eastern, mesoamerican
    AntiTraits GreekConquer_Constantinople1

    Level GreekConquer_Constantinople
        Description GreekConquer_Constantinople_desc
        EffectsDescription GreekConquer_Constantinople_effects_desc
        GainMessage GreekConquer_Constantinople_gain_desc
        Threshold 1

        Effect Command 1
        Effect Authority 2
        Effect Law 1
        Effect TroopMorale 1

;------------------------------------------
Trait RivalConquer_Constantinople1
    Characters family
    ExcludeCultures greek
    AntiTraits RivalConquer_Constantinople

    Level RivalConquer_Constantinople1
        Description RivalConquer_Constantinople1_desc
        EffectsDescription RivalConquer_Constantinople1_effects_desc
        GainMessage RivalConquer_Constantinople1_gain_desc
        Threshold 1

        Effect Command 2
        Effect Authority 2
        Effect TroopMorale 1
        Effect Loyalty -1

;------------------------------------------
Trait GreekConquer_Constantinople1
    Characters family
    ExcludeCultures northern_european, southern_european, eastern_european, middle_eastern, mesoamerican
    AntiTraits GreekConquer_Constantinople

    Level GreekConquer_Constantinople1
        Description GreekConquer_Constantinople1_desc
        EffectsDescription GreekConquer_Constantinople1_effects_desc
        GainMessage GreekConquer_Constantinople1_gain_desc
        Threshold 1

        Effect Command 1
        Effect Authority 2
        Effect Law 1
        Effect TroopMorale 1
        Effect Loyalty -1

;========= PILGRIMAGES =================
;------------------------------------------
Trait Visit_Jerusalem
    Characters family

    Level Visit_Jerusalem
        Description Visit_Jerusalem_desc
        EffectsDescription Visit_Jerusalem_effects_desc
        GainMessage Visit_Jerusalem_gain_desc
        Threshold  1 

        Effect Piety  3

;------------------------------------------
Trait Visit_Jerusalem_orthodox
    Characters family

    Level Visit_Jerusalem_orthodox
        Description Visit_Jerusalem_orthodox_desc
        EffectsDescription Visit_Jerusalem_orthodox_effects_desc
        GainMessage Visit_Jerusalem_orthodox_gain_desc
        Threshold  1 

        Effect Piety  2

;------------------------------------------
Trait Visit_Jerusalem_islamic
    Characters family

    Level Visit_Jerusalem_islamic
        Description Visit_Jerusalem_islamic_desc
        EffectsDescription Visit_Jerusalem_islamic_effects_desc
        GainMessage Visit_Jerusalem_islamic_gain_desc
        Threshold  1 

        Effect Piety  1

;------------------------------------------
Trait Visit_Jerusalem2
    Characters family

    Level Visit_Jerusalem2
        Description Visit_Jerusalem2_desc
        EffectsDescription Visit_Jerusalem2_effects_desc
        GainMessage Visit_jerusalem2_gain_desc
        Threshold  1 

        Effect Piety  -1
        Effect Loyalty -1

;------------------------------------------
Trait Visit_Rome
    Characters family

    Level Visit_Rome
        Description Visit_Rome_desc
        EffectsDescription Visit_Rome_effects_desc
        GainMessage Visit_Rome_gain_desc
        Threshold  1 

        Effect Piety  2

;------------------------------------------
Trait Visit_Santiago
    Characters family

    Level Visit_Santiago
        Description Visit_Santiago_desc
        EffectsDescription Visit_Santiago_effects_desc
        GainMessage Visit_Santiago_gain_desc
        Threshold  1 

        Effect Piety  2

;------------------------------------------
Trait Visit_Constantinople
    Characters family

    Level Visit_Constantinople
        Description visit_Constantinople_desc
        EffectsDescription Visit_Constantinople_effects_desc
        GainMessage Visit_Constantinople_gain_desc
        Threshold  1 

        Effect Piety  2

;------------------------------------------
Trait Visit_Mecca
    Characters family

    Level Visit_Mecca
        Description Visit_Mecca_desc
        EffectsDescription Visit_Mecca_effects_desc
        GainMessage Visit_Mecca_gain_desc
        Threshold  1 

        Effect Piety  3

;------------------------------------------
Trait Visit_Medina2
    Characters family

    Level Visit_Medina2
        Description Visit_Medina2_desc
        EffectsDescription Visit_Medina2_effects_desc
        GainMessage Visit_Medina2_gain_desc
        Threshold  1 

        Effect Piety  1

;=========== VANQUISHER TRAITS =================
;------------------------------------------
Trait VanquisherHeathen
    Characters family

    Level AlmostVanquisherHeathen
    Description AlmostVanquisherHeathen_desc
        EffectsDescription AlmostVanquisherHeathen_effects_desc
        Threshold 10

    Effect Piety 1
    Effect TroopMorale 1

    Level VanquisherHeathen
    Description VanquisherHeathen_desc
        EffectsDescription VanquisherHeathen_effects_desc
        Threshold 30

    Effect Piety 2
    Effect TroopMorale 1
    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherEnglish
    Characters family

    Level AlmostVanquisherEnglish
    Description AlmostVanquisherEnglish_desc
        EffectsDescription AlmostVanquisherEnglish_effects_desc
        Threshold 10

    Level VanquisherEnglish
    Description VanquisherEnglish_desc
        EffectsDescription VanquisherEnglish_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherFrench
    Characters family

    Level AlmostVanquisherFrench
    Description AlmostVanquisherFrench_desc
        EffectsDescription AlmostVanquisherFrench_effects_desc
        Threshold 10

    Level VanquisherFrench
    Description VanquisherFrench_desc
        EffectsDescription VanquisherFrench_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherHRE
    Characters family

    Level AlmostVanquisherHRE
    Description AlmostVanquisherHRE_desc
        EffectsDescription AlmostVanquisherHRE_effects_desc
        Threshold 10

    Level VanquisherHRE
    Description VanquisherHRE_desc
        EffectsDescription VanquisherHRE_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherSpanish
    Characters family

    Level AlmostVanquisherSpanish
    Description AlmostVanquisherSpanish_desc
        EffectsDescription AlmostVanquisherSpanish_effects_desc
        Threshold 10

    Level VanquisherSpanish
    Description VanquisherSpanish_desc
        EffectsDescription VanquisherSpanish_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherSicilian
    Characters family

    Level AlmostVanquisherSicilian
    Description AlmostVanquisherSicilian_desc
        EffectsDescription AlmostVanquisherSicilian_effects_desc
        Threshold 10

    Level VanquisherSicilian
    Description VanquisherSicilian_desc
        EffectsDescription VanquisherSicilian_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherScottish
    Characters family

    Level AlmostVanquisherScottish
    Description AlmostVanquisherScottish_desc
        EffectsDescription AlmostVanquisherScottish_effects_desc
        Threshold 10

    Level VanquisherScottish
    Description VanquisherScottish_desc
        EffectsDescription VanquisherScottish_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherVenetian
    Characters family

    Level AlmostVanquisherVenetian
    Description AlmostVanquisherVenetian_desc
        EffectsDescription AlmostVanquisherVenetian_effects_desc
        Threshold 10

    Level VanquisherVenetian
    Description VanquisherVenetian_desc
        EffectsDescription VanquisherVenetian_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherMilanese
    Characters family

    Level AlmostVanquisherMilanese
    Description AlmostVanquisherMilanese_desc
        EffectsDescription AlmostVanquisherMilanese_effects_desc
        Threshold 10

    Level VanquisherMilanese
    Description VanquisherMilanese_desc
        EffectsDescription VanquisherMilanese_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherRoman
    Characters family

    Level AlmostVanquisherRoman
    Description AlmostVanquisherRoman_desc
        EffectsDescription AlmostVanquisherRoman_effects_desc
        Threshold 10

    Level VanquisherRoman
    Description VanquisherRoman_desc
        EffectsDescription VanquisherRoman_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherRussian
    Characters family

    Level AlmostVanquisherRussian
    Description AlmostVanquisherRussian_desc
        EffectsDescription AlmostVanquisherRussian_effects_desc
        Threshold 10

    Level VanquisherRussian
    Description VanquisherRussian_desc
        EffectsDescription VanquisherRussian_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherMoors
    Characters family

    Level AlmostVanquisherMoors
    Description AlmostVanquisherMoors_desc
        EffectsDescription AlmostVanquisherMoors_effects_desc
        Threshold 10

    Level VanquisherMoors
    Description VanquisherMoors_desc
        EffectsDescription VanquisherMoors_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherTurks
    Characters family

    Level AlmostVanquisherTurks
    Description AlmostVanquisherTurks_desc
        EffectsDescription AlmostVanquisherTurks_effects_desc
        Threshold 10

    Level VanquisherTurks
    Description VanquisherTurks_desc
        EffectsDescription VanquisherTurks_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherFatimids
    Characters family

    Level AlmostVanquisherFatimids
    Description AlmostVanquisherFatimids_desc
        EffectsDescription AlmostVanquisherFatimids_effects_desc
        Threshold 10

    Level VanquisherFatimids
    Description VanquisherFatimids_desc
        EffectsDescription VanquisherFatimids_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherDanish
    Characters family

    Level AlmostVanquisherDanish
    Description AlmostVanquisherDanish_desc
        EffectsDescription AlmostVanquisherDanish_effects_desc
        Threshold 10

    Level VanquisherDanish
    Description VanquisherDanish_desc
        EffectsDescription VanquisherDanish_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherPortuguese
    Characters family

    Level AlmostVanquisherPortuguese
    Description AlmostVanquisherPortuguese_desc
        EffectsDescription AlmostVanquisherPortuguese_effects_desc
        Threshold 10

    Level VanquisherPortuguese
    Description VanquisherPortuguese_desc
        EffectsDescription VanquisherPortuguese_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherPolish
    Characters family

    Level AlmostVanquisherPolish
    Description AlmostVanquisherPolish_desc
        EffectsDescription AlmostVanquisherPolish_effects_desc
        Threshold 10

    Level VanquisherPolish
    Description VanquisherPolish_desc
        EffectsDescription VanquisherPolish_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherHungarian
    Characters family

    Level AlmostVanquisherHungarian
    Description AlmostVanquisherHungarian_desc
        EffectsDescription AlmostVanquisherHungarian_effects_desc
        Threshold 10

    Level VanquisherHungarian
    Description VanquisherHungarian_desc
        EffectsDescription VanquisherHungarian_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherMongols
    Characters family

    Level AlmostVanquisherMongols
    Description AlmostVanquisherMongols_desc
        EffectsDescription AlmostVanquisherMongols_effects_desc
        Threshold 10

    Level VanquisherMongols
    Description VanquisherMongols_desc
        EffectsDescription VanquisherMongols_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait VanquisherCumans
    Characters family

    Level AlmostVanquisherCumans
    Description AlmostVanquisherCumans_desc
        EffectsDescription AlmostVanquisherCumans_effects_desc
        Threshold 20

    Level VanquisherCumans
    Description VanquisherCumans_desc
        EffectsDescription VanquisherCumans_effects_desc
        Threshold 30

    Effect Authority 1
    Effect Command 1

;------------------------------------------
Trait SonVanquisherEnglish
    Characters family

    Level SonVanquisherEnglish
    Description SonVanquisherEnglish_desc
        EffectsDescription SonVanquisherEnglish_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherFrench
    Characters family

    Level SonVanquisherFrench
    Description SonVanquisherFrench_desc
        EffectsDescription SonVanquisherFrench_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherSpanish
    Characters family

    Level SonVanquisherSpanish
    Description SonVanquisherSpanish_desc
        EffectsDescription SonVanquisherSpanish_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherHRE
    Characters family

    Level SonVanquisherHRE
    Description SonVanquisherHRE_desc
        EffectsDescription SonVanquisherHRE_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherSicilian
    Characters family

    Level SonVanquisherSicilian
    Description SonVanquisherSicilian_desc
        EffectsDescription SonVanquisherSicilian_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherScottish
    Characters family

    Level SonVanquisherScottish
    Description SonVanquisherScottish_desc
        EffectsDescription SonVanquisherScottish_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherVenetian
    Characters family

    Level SonVanquisherVenetian
    Description SonVanquisherVenetian_desc
        EffectsDescription SonVanquisherVenetian_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherMilanese
    Characters family

    Level SonVanquisherMilanese
    Description SonVanquisherMilanese_desc
        EffectsDescription SonVanquisherMilanese_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherRoman
    Characters family

    Level SonVanquisherRoman
    Description SonVanquisherRoman_desc
        EffectsDescription SonVanquisherRoman_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherRussian
    Characters family

    Level SonVanquisherRussian
    Description SonVanquisherRussian_desc
        EffectsDescription SonVanquisherRussian_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherMoors
    Characters family

    Level SonVanquisherMoors
    Description SonVanquisherMoors_desc
        EffectsDescription SonVanquisherMoors_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherTurks
    Characters family

    Level SonVanquisherTurks
    Description SonVanquisherTurks_desc
        EffectsDescription SonVanquisherTurks_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherFatimids
    Characters family

    Level SonVanquisherFatimids
    Description SonVanquisherFatimids_desc
        EffectsDescription SonVanquisherFatimids_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherDanish
    Characters family

    Level SonVanquisherDanish
    Description SonVanquisherDanish_desc
        EffectsDescription SonVanquisherDanish_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherPortuguese
    Characters family

    Level SonVanquisherPortuguese
    Description SonVanquisherPortuguese_desc
        EffectsDescription SonVanquisherPortuguese_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherPolish
    Characters family

    Level SonVanquisherPolish
    Description SonVanquisherPolish_desc
        EffectsDescription SonVanquisherPolish_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherHungarian
    Characters family

    Level SonVanquisherHungarian
    Description SonVanquisherHungarian_desc
        EffectsDescription SonVanquisherHungarian_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherMongols
    Characters family

    Level SonVanquisherMongols
    Description SonVanquisherMongols_desc
        EffectsDescription SonVanquisherMongols_effects_desc
        Threshold 1

    Effect Authority 1

;------------------------------------------
Trait SonVanquisherCumans
    Characters family

    Level SonVanquisherCumans
    Description SonVanquisherCumans_desc
        EffectsDescription SonVanquisherCumans_effects_desc
        Threshold 1

    Effect Authority 1

;***************** VENDETTA - DAMN GOOD MOVIE ******************

;------------------------------------------
Trait VendettaSet
    Characters family
    Hidden

    Level VendettaSet
    Description VendettaSet_desc
        EffectsDescription VendettaSet_effects_desc
        Threshold 1

;------------------------------------------
Trait VendettaEngland
    Characters family

    Level VendettaEngland
    Description VendettaEngland_desc
        EffectsDescription VendettaEngland_effects_desc
        Threshold 2

    Effect Combat_V_Faction_England 1

;------------------------------------------
Trait VendettaFrance
    Characters family

    Level VendettaFrance
    Description VendettaFrance_desc
        EffectsDescription VendettaFrance_effects_desc
        Threshold 2

    Effect Combat_V_Faction_France 1

;------------------------------------------
Trait VendettaHRE
    Characters family

    Level VendettaHRE
    Description VendettaHRE_desc
        EffectsDescription VendettaHRE_effects_desc
        Threshold 2

    Effect Combat_V_Faction_HRE 1

;------------------------------------------
Trait VendettaSpain
    Characters family

    Level VendettaSpain
    Description VendettaSpain_desc
        EffectsDescription VendettaSpain_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Spain 1

;------------------------------------------
Trait VendettaSicily
    Characters family

    Level VendettaSicily
    Description VendettaSicily_desc
        EffectsDescription VendettaSicily_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Sicily 1

;------------------------------------------
Trait VendettaHighlanders
    Characters family

    Level VendettaHighlanders
    Description VendettaHighlanders_desc
        EffectsDescription VendettaHighlanders_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Scotland 1

;------------------------------------------
Trait VendettaVenice
    Characters family

    Level VendettaVenice
    Description VendettaVenice_desc
        EffectsDescription VendettaVenice_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Venice 1

;------------------------------------------
Trait VendettaMilan
    Characters family

    Level VendettaMilan
    Description VendettaMilan_desc
        EffectsDescription VendettaMilan_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Milan 1

;------------------------------------------
Trait VendettaByzantine
    Characters family

    Level VendettaByzantine
    Description VendettaByzantine_desc
        EffectsDescription VendettaByzantine_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Byzantium 1

;------------------------------------------
Trait VendettaRussia
    Characters family

    Level VendettaRussia
    Description VendettaRussia_desc
        EffectsDescription VendettaRussia_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Russia 1

;------------------------------------------
Trait VendettaMoors
    Characters family

    Level VendettaMoors
    Description VendettaMoors_desc
        EffectsDescription VendettaMoors_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Moors 1

;------------------------------------------
Trait VendettaTurks
    Characters family

    Level VendettaTurks
    Description VendettaTurks_desc
        EffectsDescription VendettaTurks_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Turks 1

;------------------------------------------
Trait VendettaFatimids
    Characters family

    Level VendettaFatimids
    Description VendettaFatimids_desc
        EffectsDescription VendettaFatimids_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Egypt 1

;------------------------------------------
Trait VendettaDenmark
    Characters family

    Level VendettaDenmark
    Description VendettaDenmark_desc
        EffectsDescription VendettaDenmark_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Denmark 1

;------------------------------------------
Trait VendettaPortugal
    Characters family

    Level VendettaPortugal
    Description VendettaPortugal_desc
        EffectsDescription VendettaPortugal_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Portugal 1

;------------------------------------------
Trait VendettaPoland
    Characters family

    Level VendettaPoland
    Description VendettaPoland_desc
        EffectsDescription VendettaPoland_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Poland 1

;------------------------------------------
Trait VendettaHungary
    Characters family

    Level VendettaHungary
    Description VendettaHungary_desc
        EffectsDescription VendettaHungary_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Hungary 1

;------------------------------------------
Trait VendettaMongols
    Characters family

    Level VendettaMongols
    Description VendettaMongols_desc
        EffectsDescription VendettaMongols_effects_desc
        Threshold 2

    Effect Combat_V_Faction_Mongols 1

;*********  WIP TRAITS  *********
;------------------------------------------
Trait Dad_Was_Canonized
    Characters family

  Level Dad_Was_Canonized
    Description Dad_Was_Canonized_desc
        EffectsDescription Dad_Was_Canonized_effects_desc
        Threshold 1

    Effect Piety 2

;------------------------------------------
Trait BornIntoPurple
    Characters family
    
    Level BornIntoPurple
        Description BornIntoPurple_desc
        EffectsDescription BornIntoPurple_effects_desc
        Threshold  1

        Effect Authority  1
        Effect LocalPopularity  2

;------------------------------------------
Trait BornIntoPurplePrincess
    Characters princess
    
    Level BornIntoPurplePrincess
        Description BornIntoPurplePrincess_desc
        EffectsDescription BornIntoPurplePrincess_effects_desc
        Threshold  1

        Effect PersonalSecurity  1
        Effect LocalPopularity  1

;========================================================
;   VANILLA TRAITS   
;========================================================
;*********  FACTION LEADER/FACTION HEIR TRAITS  *********
;------------------------------------------
Trait Factionleader
    Characters family
    AntiTraits Factionheir

    Level Faction_Leader
        Description Faction_Leader_desc
        EffectsDescription Faction_Leader_effects_desc
        Threshold  1 
 
        Effect Authority  3 
        Effect PersonalSecurity  3 
        Effect Level  2 
	Effect Fertility 2

;------------------------------------------
Trait Factionheir
    Characters family
    AntiTraits Exheir

    Level Heir_Apparent
        Description Heir_Apparent_desc
        EffectsDescription Heir_Apparent_effects_desc
        Threshold  1 

        Effect PersonalSecurity  2 
        Effect Level  1 
	Effect Fertility 1

;------------------------------------------
Trait Exheir
    Characters family
    AntiTraits Factionheir, FactionFutureRegent

    Level Former_Successor
        Description Former_Successor_desc
        EffectsDescription Former_Successor_effects_desc
        Threshold  1 

        Effect Loyalty -1

;------------------------------------------
Trait GoodDiplomacy
    Characters family
    AntiTraits BadDiplomacy

    Level Politcally_Wise
        Description Politcally_Wise_desc
        EffectsDescription Politcally_Wise_effects_desc
        Threshold  2 

        Effect Authority  1 

    Level Politically_Strong
        Description Politically_Strong_desc
        EffectsDescription Politically_Strong_effects_desc
        Threshold  4 

        Effect Authority  2 

    Level Politically_Powerful
        Description Politically_Powerful_desc
        EffectsDescription Politically_Powerful_effects_desc
        Threshold  8 

        Effect Authority  3 

    Level First_Among_Firsts
        Description First_Among_Firsts_desc
        EffectsDescription First_Among_Firsts_effects_desc
        Threshold  16 

        Effect Authority  4 

;------------------------------------------
Trait BadDiplomacy
    Characters family
    AntiTraits GoodDiplomacy

    Level Politically_Poor
        Description Politically_Poor_desc
        EffectsDescription Politically_Poor_effects_desc
        Threshold  2 

        Effect Authority -1 

    Level Politically_Weak
        Description Politically_Weak_desc
        EffectsDescription Politically_Weak_effects_desc
        Threshold  4 

        Effect Authority -2 

    Level Politically_Powerless
        Description Politically_Powerless_desc
        EffectsDescription Politically_Powerless_effects_desc
        Threshold  8 

        Effect Authority -3

;*********  VANILLA MILITARISTIC TRAITS  *********
;------------------------------------------
Trait BattleDread
    Characters family

    Level Winning_First
        Description Winning_First_desc
        EffectsDescription Winning_First_effects_desc
        Threshold  1 

        Effect Chivalry -1 

    Level Cruel_and_Cunning
        Description Cruel_and_Cunning_desc
        EffectsDescription Cruel_and_Cunning_effects_desc
        Threshold  3 

        Effect Chivalry -2 

    Level Merciless_Mauler
        Description Merciless_Mauler_desc
        EffectsDescription Merciless_Mauler_effects_desc
        Epithet Merciless_Mauler_epithet_desc
        Threshold  6 

        Effect Chivalry -3 

    Level Field_Tyrant
        Description Field_Tyrant_desc
        EffectsDescription Field_Tyrant_effects_desc
        Epithet Field_Tyrant_epithet_desc
        Threshold  10 

        Effect Chivalry -4 
        Effect Authority  1 

    Level Warlord_of_Terror
        Description Warlord_of_Terror_desc
        EffectsDescription Warlord_of_Terror_effects_desc
        Epithet Warlord_of_Terror_epithet_desc
        Threshold  15 

        Effect Chivalry -5 
        Effect Authority  2 

;------------------------------------------
Trait BattleChivalry
    Characters family

    Level Fair_Fighter
        Description Fair_Fighter_desc
        EffectsDescription Fair_Fighter_effects_desc
        Threshold  1 

        Effect Chivalry  1 

    Level Noble_in_Battle
        Description Noble_in_Battle_desc
        EffectsDescription Noble_in_Battle_effects_desc
        Threshold  3 

        Effect Chivalry  2 

    Level Bastion_of_Chivalry
        Description Bastion_of_Chivalry_desc
        EffectsDescription Bastion_of_Chivalry_effects_desc
        Epithet Bastion_of_Chivalry_epithet_desc
        Threshold  6 

        Effect Chivalry  3 

    Level Champion_of_Honour
        Description Champion_of_Honour_desc
        EffectsDescription Champion_of_Honour_effects_desc
        Epithet Champion_of_Honour_epithet_desc
        Threshold  10 

        Effect Chivalry  4 
        Effect Authority  1 

    Level Saint_of_Battle
        Description Saint_of_Battle_desc
        EffectsDescription Saint_of_Battle_effects_desc
        Epithet Saint_of_Battle_epithet_desc
        Threshold  15 

        Effect Chivalry  5 
        Effect Authority  2 

;------------------------------------------
Trait CaptorChivalry
    Characters family
    AntiTraits CaptorDread

    Level Respects_the_Enemy
        Description Respects_the_Enemy_desc
        EffectsDescription Respects_the_Enemy_effects_desc
        Threshold  1 

        Effect Chivalry  1 

    Level Compassionate_Victor
        Description Compassionate_Victor_desc
        EffectsDescription Compassionate_Victor_effects_desc
        Threshold  2 

        Effect Chivalry  2 

    Level Quite_Merciful
        Description Quite_Merciful_desc
        EffectsDescription Quite_Merciful_effects_desc
        Threshold  3 

        Effect Chivalry  3 

    Level Merciful_Champion
        Description Merciful_Champion_desc
        EffectsDescription Merciful_Champion_effects_desc
        Epithet Merciful_Champion_epithet_desc
        Threshold  4 

        Effect Chivalry  4 

;------------------------------------------
Trait CaptorDread
    Characters family
    AntiTraits CaptorChivalry

    Level Disrespects_Prisoners
        Description Disrespects_Prisoners_desc
        EffectsDescription Disrespects_Prisoners_effects_desc
        Threshold  1 

        Effect Chivalry -1 

    Level Lacks_Compassion
        Description Lacks_Compassion_desc
        EffectsDescription Lacks_Compassion_effects_desc
        Threshold  2 

        Effect Chivalry -2 

    Level Quite_Merciless
        Description Quite_Merciless_desc
        EffectsDescription Quite_Merciless_effects_desc
        Threshold  3 

        Effect Chivalry -3 

    Level Merciless_Conqueror
        Description Merciless_Conqueror_desc
        EffectsDescription Merciless_Conqueror_effects_desc
        Epithet Merciless_Conqueror_epithet_desc
        Threshold  4 

        Effect Chivalry -4 

;------------------------------------------
Trait RansomChivalry
    Characters family
    AntiTraits RansomDread

    Level Noble_Commander
        Description Noble_Commander_desc
        EffectsDescription Noble_Commander_effects_desc
        Threshold  1 

        Effect Chivalry  1 

    Level Honourable_Commander
        Description Honourable_Commander_desc
        EffectsDescription Honourable_Commander_effects_desc
        Threshold  2 

        Effect Chivalry  2 
        Effect TroopMorale  1 

    Level Caring_Commander
        Description Caring_Commander_desc
        EffectsDescription Caring_Commander_effects_desc
        Threshold  3 

        Effect Chivalry  3 
        Effect TroopMorale  2 

    Level Merciful_Commander
        Description Merciful_Commander_desc
        EffectsDescription Merciful_Commander_effects_desc
        Epithet Merciful_Commander_epithet_desc
        Threshold  4 

        Effect Chivalry  4 
        Effect TroopMorale  3 

;------------------------------------------
Trait RansomDread
    Characters family
    AntiTraits RansomChivalry

    Level Grim_Commander
        Description Grim_Commander_desc
        EffectsDescription Grim_Commander_effects_desc
        Threshold  1 

        Effect Chivalry -1 

    Level Cold_Commander
        Description Cold_Commander_desc
        EffectsDescription Cold_Commander_effects_desc
        Threshold  2 

        Effect Chivalry -2 
        Effect TroopMorale -1 

    Level Harsh_Commander
        Description Harsh_Commander_desc
        EffectsDescription Harsh_Commander_effects_desc
        Threshold  3 

        Effect Chivalry -3 
        Effect TroopMorale -2 

    Level Merciless_Commander
        Description Merciless_Commander_desc
        EffectsDescription Merciless_Commander_effects_desc
        Epithet Merciless_Commander_epithet_desc
        Threshold  4 

        Effect Chivalry -4 
        Effect TroopMorale -3 

;------------------------------------------
Trait VictorVirtue
    Characters family

    Level Renowned_Victor
        Description Renowned_Victor_desc
        EffectsDescription Renowned_Victor_effects_desc
        Threshold  10 

        Effect Authority  1 
        Effect PersonalSecurity -1 
        Effect LocalPopularity  1 

    Level Famous_Victor
        Description Famous_Victor_desc
        EffectsDescription Famous_Victor_effects_desc
        Threshold  20 

        Effect Authority  2 
        Effect PersonalSecurity -1 
        Effect LocalPopularity  2 

    Level Conquering_Hero
        Description Conquering_Hero_desc
        EffectsDescription Conquering_Hero_effects_desc
        Epithet Conquering_Hero_epithet_desc
        Threshold  30 

        Effect Authority  3 
        Effect PersonalSecurity -2 
        Effect LocalPopularity  3

;------------------------------------------
Trait Despoiler
    Characters family

    Level Looter
        Description Looter_desc
        EffectsDescription Looter_effects_desc
        Threshold  2 

        Effect Looting   10 

    Level Pillager
        Description Pillager_desc
        EffectsDescription Pillager_effects_desc
        Threshold  5 

        Effect Looting   20 

    Level Sacker_of_Cities
        Description Sacker_of_Cities_desc
        EffectsDescription Sacker_of_Cities_effects_desc
        Threshold  9 

        Effect Looting   30 
        Effect Chivalry  -1 

;------------------------------------------
Trait Genocide
    Characters family

    Level Brutal_Conqueror
        Description Brutal_Conqueror_desc
        EffectsDescription Brutal_Conqueror_effects_desc
        Threshold  2 

        Effect Chivalry -1 
        Effect Piety -1  
        Effect Looting   20 

    Level Exterminator
        Description Exterminator_desc
        EffectsDescription Exterminator_effects_desc
        Threshold  5 

        Effect Chivalry -2 
        Effect Piety -2 
        Effect Unrest  1
        Effect Looting   30 

    Level Butcher
        Description Butcher_desc
        EffectsDescription Butcher_effects_desc
        Epithet Butcher_epithet_desc
        Threshold  9 

        Effect Chivalry -3 
        Effect Piety -3 
        Effect Unrest  2
        Effect Looting   40

;------------------------------------------
Trait FactionKiller
    Characters family

    Level Conqueror
        Description Conqueror_desc
        EffectsDescription Conqueror_effects_desc
        Threshold  10 

        Effect Authority  1 
        Effect Command  1 
        Effect Chivalry -1 

    Level Great_Conqueror
        Description Great_Conqueror_desc
        EffectsDescription Great_Conqueror_effects_desc
        Epithet Great_Conqueror_epithet_desc
        Threshold  20 

        Effect Authority  2 
        Effect Command  2 
        Effect Chivalry -2 

    Level Legendary_Conqueror
        Description Legendary_Conqueror_desc
        EffectsDescription Legendary_Conqueror_effects_desc
        Epithet Legendary_Conqueror_epithet_desc
        Threshold  30 

        Effect Authority  3 
        Effect Command  3 
        Effect Chivalry -3 

    Level All_Conquering
        Description All_Conquering_desc
        EffectsDescription All_Conquering_effects_desc
        Epithet All_Conquering_epithet_desc
        Threshold  40 

        Effect Authority  4
        Effect Command  3 
        Effect Chivalry -4 

;------------------------------------------
Trait GoodCommander
    Characters family
    AntiTraits BadCommander

    Level Promising_Commander
        Description Promising_Commander_desc
        EffectsDescription Promising_Commander_effects_desc
        GainMessage Promising_Commander_gain_desc
        Threshold  1 

        Effect Command  1 

    Level Aspiring_Commander
        Description Aspiring_Commander_desc
        EffectsDescription Aspiring_Commander_effects_desc
        GainMessage Aspiring_Commander_gain_desc
        Threshold  3

        Effect Command  2 
        Effect MovementPoints  1 

    Level Proven_Commander
        Description Proven_Commander_desc
        EffectsDescription Proven_Commander_effects_desc
        GainMessage Proven_Commander_gain_desc
        Threshold  7

        Effect Command  3 
        Effect MovementPoints  1 
        Effect LineOfSight  1 

    Level Great_Commander
        Description Great_Commander_desc
        EffectsDescription Great_Commander_effects_desc
        GainMessage Great_Commander_gain_desc
        Threshold  16 

        Effect Command  4
        Effect Authority  1 
        Effect MovementPoints  1 
        Effect LineOfSight  1 

    Level Legendary_Commander
        Description Legendary_Commander_desc
        EffectsDescription Legendary_Commander_effects_desc
        GainMessage Legendary_Commander_gain_desc
        Epithet Legendary_Commander_epithet_desc
        Threshold  32 

        Effect Command  5 
        Effect Authority  2
        Effect MovementPoints  2 
        Effect LineOfSight  2 

;------------------------------------------
Trait BadCommander
    Characters family
    AntiTraits GoodCommander, NaturalMilitarySkill

    Level Unproven_Commander
        Description Unproven_Commander_desc
        EffectsDescription Unproven_Commander_effects_desc
        Threshold  2 

        Effect Command -1 

    Level Incompetent_Commander
        Description Incompetent_Commander_desc
        EffectsDescription Incompetent_Commander_effects_desc
        Threshold  5 

        Effect Command -2 
        Effect MovementPoints  -1 
        Effect TroopMorale  -1 

    Level Pathetic_Commander
        Description Pathetic_Commander_desc
        EffectsDescription Pathetic_Commander_effects_desc
        Threshold  8 

        Effect Command -3 
        Effect MovementPoints  -1
        Effect TroopMorale  -1 
        Effect Loyalty  -1 
        Effect Authority  -1

    Level Useless_Commander
        Description Useless_Commander_desc
        EffectsDescription Useless_Commander_effects_desc
        Epithet Useless_Commander_epithet_desc
        Threshold  10

        Effect Command -5 
        Effect MovementPoints  -1
        Effect TroopMorale  -2 
        Effect Loyalty  -2 
        Effect Authority  -2

;------------------------------------------
Trait Disciplinarian
    Characters family
    NoGoingBackLevel  2 
    AntiTraits BadDisciplinarian

    Level Conscientious_Trainer
        Description Conscientious_Trainer_desc
        EffectsDescription Conscientious_Trainer_effects_desc
        Threshold  1 

        Effect TroopMorale  1 
        Effect MovementPoints  1 

    Level Drillmaster
        Description Drillmaster_desc
        EffectsDescription Drillmaster_effects_desc
        Threshold  3 

        Effect TroopMorale -1 
        Effect MovementPoints  1

    Level Harsh_Taskmaster
        Description Harsh_Taskmaster_desc
        EffectsDescription Harsh_Taskmaster_effects_desc
        Threshold  5 

        Effect Command  1 
        Effect Authority  1 
        Effect TroopMorale -2 
        Effect MovementPoints  2
        Effect Law  1 

;------------------------------------------
Trait BadDisciplinarian
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Disciplinarian

    Level Poor_Disciplinarian
        Description Poor_Disciplinarian_desc
        EffectsDescription Poor_Disciplinarian_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect MovementPoints -1

    Level Easy_on_the_Men
        Description Easy_on_the_Men_desc
        EffectsDescription Easy_on_the_Men_effects_desc
        Threshold  4 

        Effect TroopMorale  2 
        Effect MovementPoints -1

    Level Way_too_Leniant
        Description Way_too_Leniant_desc
        EffectsDescription Way_too_Leniant_effects_desc
        Threshold  8 

        Effect Command -1 
        Effect Authority -1 
        Effect TroopMorale  3 
        Effect MovementPoints -1
        Effect Law -1 

;------------------------------------------
Trait GoodInfantryGeneral
    Characters family
    AntiTraits BadInfantryGeneral

    Level Good_with_Infantry
        Description Good_with_Infantry_desc
        EffectsDescription Good_with_Infantry_effects_desc
        Threshold  3 

        Effect InfantryCommand  1 

    Level Skilled_with_Infantry
        Description Skilled_with_Infantry_desc
        EffectsDescription Skilled_with_Infantry_effects_desc
        Threshold  6 

        Effect InfantryCommand  2 

    Level Infantry_Master
        Description Infantry_Master_desc
        EffectsDescription Infantry_Master_effects_desc
        GainMessage Infantry_Master_gain_desc
        Epithet Infantry_Master_epithet_desc
        Threshold  10

        Effect InfantryCommand  3 

;------------------------------------------
Trait BadInfantryGeneral
    Characters family
    AntiTraits GoodInfantryGeneral

    Level Poor_with_Infantry
        Description Poor_with_Infantry_desc
        EffectsDescription Poor_with_Infantry_effects_desc
        Threshold  2 

        Effect InfantryCommand -1 

    Level Inept_with_Infantry
        Description Inept_with_Infantry_desc
        EffectsDescription Inept_with_Infantry_effects_desc
        Threshold  3 

        Effect InfantryCommand -2 

    Level Confused_with_Infantry
        Description Confused_with_Infantry_desc
        EffectsDescription Confused_with_Infantry_effects_desc
        Threshold  6 

        Effect InfantryCommand -3 

;------------------------------------------
Trait GoodCavalryGeneral
    Characters family
    AntiTraits BadCavalryGeneral

    Level Good_with_Cavalry
        Description Good_with_Cavalry_desc
        EffectsDescription Good_with_Cavalry_effects_desc
        Threshold  3 

        Effect CavalryCommand  1 

    Level Dangerous_with_Cavalry
        Description Dangerous_with_Cavalry_desc
        EffectsDescription Dangerous_with_Cavalry_effects_desc
        Threshold  6 

        Effect CavalryCommand  2 

    Level Great_Cavalry_Commander
        Description Great_Cavalry_Commander_desc
        EffectsDescription Great_Cavalry_Commander_effects_desc
        GainMessage Great_Cavalry_Commander_gain_desc
        Epithet Great_Cavalry_Commander_epithet_desc
        Threshold  10 

        Effect CavalryCommand  3 

;------------------------------------------
Trait BadCavalryGeneral
    Characters family
    AntiTraits GoodCavalryGeneral

    Level Poor_with_Cavalry
        Description Poor_with_Cavalry_desc
        EffectsDescription Poor_with_Cavalry_effects_desc
        Threshold  2 

        Effect CavalryCommand -1 

    Level Inept_with_Cavalry
        Description Inept_with_Cavalry_desc
        EffectsDescription Inept_with_Cavalry_effects_desc
        Threshold  3 

        Effect CavalryCommand -2 

    Level Shameful_with_Cavalry
        Description Shameful_with_Cavalry_desc
        EffectsDescription Shameful_with_Cavalry_effects_desc
        Threshold  4 

        Effect CavalryCommand -3

;------------------------------------------
Trait GoodArtilleryCommander
    Characters family
    AntiTraits BadArtilleryCommander

    Level Good_with_Artillery
        Description Good_with_Artillery_desc
        EffectsDescription Good_with_Artillery_effects_desc
        Threshold  1 

        Effect ArtilleryCommand  1 

    Level Adept_with_Artillery
        Description Adept_with_Artillery_desc
        EffectsDescription Adept_with_Artillery_effects_desc
        Threshold  2 

        Effect ArtilleryCommand  2 

    Level Expert_with_Artillery
        Description Expert_with_Artillery_desc
        EffectsDescription Expert_with_Artillery_effects_desc
        Threshold  3 

        Effect ArtilleryCommand  3 

    Level Masterful_with_Artillery
        Description Masterful_with_Artillery_desc
        EffectsDescription Masterful_with_Artillery_effects_desc
        Threshold  4 

        Effect ArtilleryCommand  4 

;------------------------------------------
Trait BadArtilleryCommander
    Characters family
    AntiTraits GoodArtilleryCommander

    Level Poor_with_Artillery
        Description Poor_with_Artillery_desc
        EffectsDescription Poor_with_Artillery_effects_desc
        Threshold  1 

        Effect ArtilleryCommand -1 

    Level Awful_with_Artillery
        Description Awful_with_Artillery_desc
        EffectsDescription Awful_with_Artillery_effects_desc
        Threshold  2 

        Effect ArtilleryCommand -2 

    Level Diabolical_with_Artillery
        Description Diabolical_with_Artillery_desc
        EffectsDescription Diabolical_with_Artillery_effects_desc
        Threshold  3 

        Effect ArtilleryCommand -3 

;------------------------------------------
Trait GoodGunpowderCommander
    Characters family
    AntiTraits BadArtilleryCommander

    Level Good_with_Guns
        Description Good_with_Guns_desc
        EffectsDescription Good_with_Guns_effects_desc
        Threshold  1 

        Effect GunpowderCommand  1 

    Level Adept_with_Guns
        Description Adept_with_Guns_desc
        EffectsDescription Adept_with_Guns_effects_desc
        Threshold  3 

        Effect GunpowderCommand  2 

    Level Expert_with_Guns
        Description Expert_with_Guns_desc
        EffectsDescription Expert_with_Guns_effects_desc
        Threshold  6 

        Effect GunpowderCommand  3 

    Level Masterful_with_Guns
        Description Masterful_with_Guns_desc
        EffectsDescription Masterful_with_Guns_effects_desc
        Threshold  10

        Effect GunpowderCommand  4 

;------------------------------------------
Trait BadGunpowderCommander
    Characters family
    AntiTraits GoodArtilleryCommander

    Level Poor_with_Guns
        Description Poor_with_Guns_desc
        EffectsDescription Poor_with_Guns_effects_desc
        Threshold  1 

        Effect GunpowderCommand -1 

    Level Awful_with_Guns
        Description Awful_with_Guns_desc
        EffectsDescription Awful_with_Guns_effects_desc
        Threshold  2 

        Effect GunpowderCommand -2 

    Level Useless_with_Guns
        Description Useless_with_Guns_desc
        EffectsDescription Useless_with_Guns_effects_desc
        Threshold  3 

        Effect GunpowderCommand -3 

;------------------------------------------
Trait NightBattleCapable
    Characters family
    AntiTraits Noctophobia

    Level Night_Fighter
        Description Night_Fighter_desc
        EffectsDescription Night_Fighter_effects_desc
        Threshold  1 

        Effect NightBattle  1

;------------------------------------------
Trait BattleScarred
    Characters family

    Level Marks_of_War
        Description Marks_of_War_desc
        EffectsDescription Marks_of_War_effects_desc
        Threshold  1 

        Effect Authority  1 
        Effect HitPoints  2 

    Level Scarred
        Description Scarred_desc
        EffectsDescription Scarred_effects_desc
        Threshold  3 

        Effect Authority  1 
        Effect HitPoints  4 

    Level Terribly_Scarred
        Description Terribly_Scarred_desc
        EffectsDescription Terribly_Scarred_effects_desc
        Threshold  6

        Effect Authority  2 
        Effect HitPoints  6 

    Level Brutally_Scarred
        Description Brutally_Scarred_desc
        EffectsDescription Brutally_Scarred_effects_desc
        GainMessage Brutally_Scarred_gain_desc
        Epithet Brutally_Scarred_epithet_desc
        Threshold  10

        Effect Authority  2 
        Effect HitPoints  8

;------------------------------------------
Trait Berserker
    Characters family
    ExcludeCultures middle_eastern, greek, southern_european
    NoGoingBackLevel  1 

    Level Fierce_in_Battle
        Description Fierce_in_Battle_desc
        EffectsDescription Fierce_in_Battle_effects_desc
        GainMessage Fierce_in_Battle_gain_desc
        Threshold  1 

        Effect Chivalry -1 
        Effect TroopMorale  1 
        Effect Attack  1 
        Effect Defence -1 

    Level Crazy_in_Battle
        Description Crazy_in_Battle_desc
        EffectsDescription Crazy_in_Battle_effects_desc
        Threshold  3 

        Effect Chivalry -2 
        Effect TroopMorale  2 
        Effect Attack  2 
        Effect Defence -2 
        Effect HitPoints  2 

    Level Berserker
        Description Berserker_desc
        EffectsDescription Berserker_effects_desc
        GainMessage Berserker_gain_desc
        Epithet Berserker_epithet_desc
        Threshold  5

        Effect Chivalry -4 
        Effect TroopMorale  3 
        Effect Attack  3 
        Effect Defence -3 
        Effect HitPoints  4

;------------------------------------------
Trait TooOldToFight
    Characters family

    Level Beyond_Battle
        Description Beyond_Battle_desc
        EffectsDescription Beyond_Battle_effects_desc
        Threshold  1

	Effect HitPoints -4
	Effect MovementPoints -3
	Effect TroopMorale -1
	Effect Command -1 

;------------------------------------------
Trait Fearscuman
    Characters family
    ExcludeCultures mesoamerican
    AntiTraits Hatescuman

    Level Nervous_Near_Cumans
        Description Nervous_Near_Cumans_desc
        EffectsDescription Nervous_Near_Cumans_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Cumans -1 

    Level Fears_Cumans
        Description Fears_Cumans_desc
        EffectsDescription Fears_Cumans_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Cumans -2 

    Level Terrified_by_Cuman_Ways
        Description Terrified_by_Cuman_Ways_desc
        EffectsDescription Terrified_by_Cuman_Ways_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Cumans -3 

;------------------------------------------
Trait Hatescuman
    Characters family
    ExcludeCultures mesoamerican
    NoGoingBackLevel  3 
    AntiTraits Fearscuman

    Level Despises_Cuman_Ways
        Description Despises_Cuman_Ways_desc
        EffectsDescription Despises_Cuman_Ways_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Cumans  1 

    Level Hates_Cumans
        Description Hates_Cumans_desc
        EffectsDescription Hates_Cumans_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Cumans  2 

    Level Loathes_Heathen_Cumans
        Description Loathes_Heathen_Cumans_desc
        EffectsDescription Loathes_Heathen_Cumans_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Cumans  3 

;------------------------------------------
Trait Fearsbyzantium
    Characters family
    AntiTraits Hatesbyzantium

    Level Nervous_Near_Byzantine
        Description Nervous_Near_Byzantine_desc
        EffectsDescription Nervous_Near_Byzantine_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Byzantium -1 

    Level Fears_the_Byzantine
        Description Fears_the_Byzantine_desc
        EffectsDescription Fears_the_Byzantine_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Byzantium -2 

    Level Terrified_of_Byzantium
        Description Terrified_of_Byzantium_desc
        EffectsDescription Terrified_of_Byzantium_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Byzantium -3 

;------------------------------------------
Trait Hatesbyzantium
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsbyzantium

    Level Dislikes_the_Byzantines
        Description Dislikes_the_Byzantines_desc
        EffectsDescription Dislikes_the_Byzantines_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Byzantium  1 

    Level Hates_the_Byzantines
        Description Hates_the_Byzantines_desc
        EffectsDescription Hates_the_Byzantines_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Byzantium  2 

    Level Loathes_all_Byzantines
        Description Loathes_all_Byzantines_desc
        EffectsDescription Loathes_all_Byzantines_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Byzantium  3 

;------------------------------------------
Trait Fearsdenmark
    Characters family
    AntiTraits Hatesdenmark

    Level Uncomfortable_Near_Danes
        Description Uncomfortable_Near_Danes_desc
        EffectsDescription Uncomfortable_Near_Danes_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Denmark -1 

    Level Fears_Danes
        Description Fears_Danes_desc
        EffectsDescription Fears_Danes_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Denmark -2 

    Level Terrified_by_Danish
        Description Terrified_by_Danish_desc
        EffectsDescription Terrified_by_Danish_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Denmark -3 

;------------------------------------------
Trait Hatesdenmark
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsdenmark

    Level Dislikes_the_Danes
        Description Dislikes_the_Danes_desc
        EffectsDescription Dislikes_the_Danes_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Denmark  1 

    Level Hates_the_Danes
        Description Hates_the_Danes_desc
        EffectsDescription Hates_the_Danes_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Denmark  2 

    Level Loathes_Disgusting_Danish
        Description Loathes_Disgusting_Danish_desc
        EffectsDescription Loathes_Disgusting_Danish_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Denmark  3 

;------------------------------------------
Trait Fearsegypt
    Characters family
    AntiTraits Hatesegypt

    Level Edgey_around_Egyptians
        Description Edgey_around_Egyptians_desc
        EffectsDescription Edgey_around_Egyptians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Egypt -1 

    Level Fears_the_Egyptians
        Description Fears_the_Egyptians_desc
        EffectsDescription Fears_the_Egyptians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Egypt -2 

    Level Terrified_by_Egptians
        Description Terrified_by_Egptians_desc
        EffectsDescription Terrified_by_Egptians_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Egypt -3 

;------------------------------------------
Trait Hatesegypt
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsegypt

    Level Dislikes_the_Egyptians
        Description Dislikes_the_Egyptians_desc
        EffectsDescription Dislikes_the_Egyptians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Egypt  1 

    Level Hates_the_Egyptians
        Description Hates_the_Egyptians_desc
        EffectsDescription Hates_the_Egyptians_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Egypt  2 

    Level Loathes_the_Evil_Egyptians
        Description Loathes_the_Evil_Egyptians_desc
        EffectsDescription Loathes_the_Evil_Egyptians_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Egypt  3 

;------------------------------------------
Trait Fearsengland
    Characters family
    AntiTraits Hatesengland

    Level Edgey_Around_the_English
        Description Edgey_Around_the_English_desc
        EffectsDescription Edgey_Around_the_English_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_England -1 

    Level Fears_the_English
        Description Fears_the_English_desc
        EffectsDescription Fears_the_English_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_England -2 

    Level Terrified_by_the_English
        Description Terrified_by_the_English_desc
        EffectsDescription Terrified_by_the_English_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_England -3 

;------------------------------------------
Trait Hatesengland
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsengland

    Level Dislikes_the_English
        Description Dislikes_the_English_desc
        EffectsDescription Dislikes_the_English_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_England  1 

    Level Hates_the_English
        Description Hates_the_English_desc
        EffectsDescription Hates_the_English_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_England  2 

    Level Loathes_the_Evil_English
        Description Loathes_the_Evil_English_desc
        EffectsDescription Loathes_the_Evil_English_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_England  3 

;------------------------------------------
Trait Fearsfrance
    Characters family
    AntiTraits Hatesfrance

    Level Wary_of_the_French
        Description Wary_of_the_French_desc
        EffectsDescription Wary_of_the_French_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_France -1 

    Level Fears_the_French
        Description Fears_the_French_desc
        EffectsDescription Fears_the_French_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_France -2 

    Level Terrified_by_the_French
        Description Terrified_by_the_French_desc
        EffectsDescription Terrified_by_the_French_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_France -3 

;------------------------------------------
Trait Hatesfrance
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsfrance

    Level Dislikes_the_French
        Description Dislikes_the_French_desc
        EffectsDescription Dislikes_the_French_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_France  1 

    Level Hates_the_French
        Description Hates_the_French_desc
        EffectsDescription Hates_the_French_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_France  2 

    Level Loathes_the_French_Fools
        Description Loathes_the_French_Fools_desc
        EffectsDescription Loathes_the_French_Fools_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_France  3 

;------------------------------------------
Trait Fearshre
    Characters family
    AntiTraits Hateshre

    Level Edgey_around_Imperials
        Description Edgey_around_Imperials_desc
        EffectsDescription Edgey_around_Imperials_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_HRE -1 

    Level Fears_the_Reich
        Description Fears_the_Reich_desc
        EffectsDescription Fears_the_Reich_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_HRE -2 

    Level Terrified_of_the_Empire
        Description Terrified_of_the_Empire_desc
        EffectsDescription Terrified_of_the_Empire_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_HRE -3 

;------------------------------------------
Trait Hateshre
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearshre

    Level Dislikes_the_Reich
        Description Dislikes_the_Reich_desc
        EffectsDescription Dislikes_the_Reich_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_HRE  1 

    Level Hates_the_Reich
        Description Hates_the_Reich_desc
        EffectsDescription Hates_the_Reich_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_HRE  2 

    Level Loathes_the_Empire
        Description Loathes_the_Empire_desc
        EffectsDescription Loathes_the_Empire_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_HRE  3 

;------------------------------------------
Trait Fearshungary
    Characters family
    AntiTraits Hateshungary

    Level Nervous_near_Hungarians
        Description Nervous_near_Hungarians_desc
        EffectsDescription Nervous_near_Hungarians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Hungary -1 

    Level Fears_Hungarians
        Description Fears_Hungarians_desc
        EffectsDescription Fears_Hungarians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Hungary -2 

    Level Terrified_of_Hungarians
        Description Terrified_of_Hungarians_desc
        EffectsDescription Terrified_of_Hungarians_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Hungary -3 

;------------------------------------------
Trait Hateshungary
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearshungary

    Level Dislikes_Hungarians
        Description Dislikes_Hungarians_desc
        EffectsDescription Dislikes_Hungarians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Hungary  1 

    Level Hates_the_Hungarians
        Description Hates_the_Hungarians_desc
        EffectsDescription Hates_the_Hungarians_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Hungary  2 

    Level Loathes_the_Magyar
        Description Loathes_the_Magyar_desc
        EffectsDescription Loathes_the_Magyar_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Hungary  3 

;------------------------------------------
Trait Fearsmilan
    Characters family
    AntiTraits Hatesmilan

    Level Nervous_near_Milanese
        Description Nervous_near_Milanese_desc
        EffectsDescription Nervous_near_Milanese_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Milan -1 

    Level Fears_Milanese
        Description Fears_Milanese_desc
        EffectsDescription Fears_Milanese_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Milan -2 

    Level Terrified_of_Milanese_Might
        Description Terrified_of_Milanese_Might_desc
        EffectsDescription Terrified_of_Milanese_Might_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Milan -3 

;------------------------------------------
Trait Hatesmilan
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsmilan

    Level Dislikes_Milanese
        Description Dislikes_Milanese_desc
        EffectsDescription Dislikes_Milanese_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Milan  1 

    Level Hates_the_Milanese
        Description Hates_the_Milanese_desc
        EffectsDescription Hates_the_Milanese_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Milan  2 

    Level Loathes_the_Miserly_Milanese
        Description Loathes_the_Miserly_Milanese_desc
        EffectsDescription Loathes_the_Miserly_Milanese_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Milan  3 

;------------------------------------------
Trait Fearsmongols
    Characters family
    AntiTraits Hatesmongols

    Level Wary_of_Mongols
        Description Wary_of_Mongols_desc
        EffectsDescription Wary_of_Mongols_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Mongols -1 

    Level Fears_Mongols
        Description Fears_Mongols_desc
        EffectsDescription Fears_Mongols_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Mongols -2 

    Level Terrified_of_the_Mongols
        Description Terrified_of_the_Mongols_desc
        EffectsDescription Terrified_of_the_Mongols_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Mongols -3 

;------------------------------------------
Trait Hatesmongols
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsmongols

    Level Dislikes_the_Mongols
        Description Dislikes_the_Mongols_desc
        EffectsDescription Dislikes_the_Mongols_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Mongols  1 

    Level Hates_the_Mongols
        Description Hates_the_Mongols_desc
        EffectsDescription Hates_the_Mongols_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Mongols  2 

    Level Loathes_the_Murderous_Mongols
        Description Loathes_the_Murderous_Mongols_desc
        EffectsDescription Loathes_the_Murderous_Mongols_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Mongols  3 

;------------------------------------------
Trait Fearsmoors
    Characters family
    AntiTraits Hatesmoors

    Level Nervous_near_Moors
        Description Nervous_near_Moors_desc
        EffectsDescription Nervous_near_Moors_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Moors -1 

    Level Fears_the_Moors
        Description Fears_the_Moors_desc
        EffectsDescription Fears_the_Moors_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Moors -2 

    Level Terrified_of_the_Moors
        Description Terrified_of_the_Moors_desc
        EffectsDescription Terrified_of_the_Moors_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Moors -3 

;------------------------------------------
Trait Hatesmoors
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsmoors

    Level Dislikes_Moors
        Description Dislikes_Moors_desc
        EffectsDescription Dislikes_Moors_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Moors  1 

    Level Hates_the_Moors
        Description Hates_the_Moors_desc
        EffectsDescription Hates_the_Moors_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Moors  2 

    Level Loathes_the_Moors
        Description Loathes_the_Moors_desc
        EffectsDescription Loathes_the_Moors_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Moors  3 

;------------------------------------------
Trait Fearspapal_states
    Characters family
    AntiTraits Hatespapal_states

    Level Wary_of_the_Papacy
        Description Wary_of_the_Papacy_desc
        EffectsDescription Wary_of_the_Papacy_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Papal_States -1 

    Level Fears_the_Papacy
        Description Fears_the_Papacy_desc
        EffectsDescription Fears_the_Papacy_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Papal_States -2 

    Level Terrified_of_Papal_Forces
        Description Terrified_of_Papal_Forces_desc
        EffectsDescription Terrified_of_Papal_Forces_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Papal_States -3 

;------------------------------------------
Trait Hatespapal_states
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearspapal_states

    Level Dislikes_the_Papacy
        Description Dislikes_the_Papacy_desc
        EffectsDescription Dislikes_the_Papacy_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Papal_States  1 

    Level Hates_the_Papacy
        Description Hates_the_Papacy_desc
        EffectsDescription Hates_the_Papacy_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Papal_States  2 

    Level Loathes_the_Papacy
        Description Loathes_the_Papacy_desc
        EffectsDescription Loathes_the_Papacy_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Papal_States  3 

;------------------------------------------
Trait Fearspoland
    Characters family
    AntiTraits Hatespoland

    Level Wary_of_Poles
        Description Wary_of_Poles_desc
        EffectsDescription Wary_of_Poles_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Poland -1 

    Level Fears_the_Poles
        Description Fears_the_Poles_desc
        EffectsDescription Fears_the_Poles_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Poland -2 

    Level Terrified_of_Poles
        Description Terrified_of_Poles_desc
        EffectsDescription Terrified_of_Poles_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Poland -3 

;------------------------------------------
Trait Hatespoland
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearspoland

    Level Dislikes_the_Poles
        Description Dislikes_the_Poles_desc
        EffectsDescription Dislikes_the_Poles_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Poland  1 

    Level Hates_the_Poles
        Description Hates_the_Poles_desc
        EffectsDescription Hates_the_Poles_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Poland  2 

    Level Loathes_Poland
        Description Loathes_Poland_desc
        EffectsDescription Loathes_Poland_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Poland  3 

;------------------------------------------
Trait Fearsportugal
    Characters family
    AntiTraits Hatesportugal

    Level Wary_of_Portugese
        Description Wary_of_Portugese_desc
        EffectsDescription Wary_of_Portugese_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Portugal -1 

    Level Fears_Portugese
        Description Fears_Portugese_desc
        EffectsDescription Fears_Portugese_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Portugal -2 

    Level Terrified_of_Portugese
        Description Terrified_of_Portugese_desc
        EffectsDescription Terrified_of_Portugese_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Portugal -3 

;------------------------------------------
Trait Hatesportugal
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsportugal

    Level Dislikes_Portugese
        Description Dislikes_Portugese_desc
        EffectsDescription Dislikes_Portugese_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Portugal  1 

    Level Hates_Portugese
        Description Hates_Portugese_desc
        EffectsDescription Hates_Portugese_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect Combat_V_Faction_Portugal  2 

    Level Loathes_Portugal
        Description Loathes_Portugal_desc
        EffectsDescription Loathes_Portugal_effects_desc
        Threshold  4 

        Effect Combat_V_Faction_Portugal  3 

;------------------------------------------
Trait Fearsslave
    Characters family
    AntiTraits Hatesslave

    Level Wary_of_Rebels
        Description Wary_of_Rebels_desc
        EffectsDescription Wary_of_Rebels_effects_desc
        Threshold  1 


    Level Fears_Rebelling_Forces
        Description Fears_Rebelling_Forces_desc
        EffectsDescription Fears_Rebelling_Forces_effects_desc
        Threshold  2 

        Effect TroopMorale -1 

    Level Terrified_of_Rebellion
        Description Terrified_of_Rebellion_desc
        EffectsDescription Terrified_of_Rebellion_effects_desc
        Threshold  4 

        Effect Loyalty  1 
        Effect TroopMorale -2 

;------------------------------------------
Trait Hatesslave
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsslave

    Level Dislikes_Rebels
        Description Dislikes_Rebels_desc
        EffectsDescription Dislikes_Rebels_effects_desc
        Threshold  1 


    Level Hates_Rebels
        Description Hates_Rebels_desc
        EffectsDescription Hates_Rebels_effects_desc
        Threshold  2 

        Effect TroopMorale  1 

    Level Loathes_Rebelious_Scum
        Description Loathes_Rebelious_Scum_desc
        EffectsDescription Loathes_Rebelious_Scum_effects_desc
        GainMessage Loathes_Rebelious_Scum_gain_desc
        Threshold  4 

        Effect Loyalty  1 

;------------------------------------------
Trait Fearsrussia
    Characters family
    AntiTraits Hatesrussia

    Level Wary_of_Russians
        Description Wary_of_Russians_desc
        EffectsDescription Wary_of_Russians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Russia -1 

    Level Fears_Russians
        Description Fears_Russians_desc
        EffectsDescription Fears_Russians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Russia -2 

    Level Terrified_of_Russians
        Description Terrified_of_Russians_desc
        EffectsDescription Terrified_of_Russians_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Russia -3 

;------------------------------------------
Trait Hatesrussia
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsrussia

    Level Dislikes_Russians
        Description Dislikes_Russians_desc
        EffectsDescription Dislikes_Russians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Russia  1 

    Level Hates_Russians
        Description Hates_Russians_desc
        EffectsDescription Hates_Russians_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Russia  2 

    Level Loathes_Russians
        Description Loathes_Russians_desc
        EffectsDescription Loathes_Russians_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Russia  3 

;------------------------------------------
Trait Fearsscotland
    Characters family
    AntiTraits Hatesscotland

    Level Wary_of_Scots
        Description Wary_of_Scots_desc
        EffectsDescription Wary_of_Scots_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Scotland -1 

    Level Fears_Scots
        Description Fears_Scots_desc
        EffectsDescription Fears_Scots_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Scotland -2 

    Level Terrified_of_Scottish
        Description Terrified_of_Scottish_desc
        EffectsDescription Terrified_of_Scottish_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Scotland -3 

;------------------------------------------
Trait Hatesscotland
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsscotland

    Level Dislikes_Scots
        Description Dislikes_Scots_desc
        EffectsDescription Dislikes_Scots_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Scotland  1 

    Level Hates_Scots
        Description Hates_Scots_desc
        EffectsDescription Hates_Scots_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Scotland  2 

    Level Loathes_Scottish_Scum
        Description Loathes_Scottish_Scum_desc
        EffectsDescription Loathes_Scottish_Scum_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Scotland  3 

;------------------------------------------
Trait Fearssicily
    Characters family
    AntiTraits Hatessicily

    Level Wary_of_Sicilians
        Description Wary_of_Sicilians_desc
        EffectsDescription Wary_of_Sicilians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Sicily -1 

    Level Fears_Sicilians
        Description Fears_Sicilians_desc
        EffectsDescription Fears_Sicilians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Sicily -2 

    Level Terrified_of_Sicilians
        Description Terrified_of_Sicilians_desc
        EffectsDescription Terrified_of_Sicilians_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Sicily -3 

;------------------------------------------
Trait Hatessicily
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearssicily

    Level Dislikes_Sicilians
        Description Dislikes_Sicilians_desc
        EffectsDescription Dislikes_Sicilians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Sicily  1 

    Level Hates_Sicilians
        Description Hates_Sicilians_desc
        EffectsDescription Hates_Sicilians_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Sicily  2 

    Level Loathes_Sicilian_Scum
        Description Loathes_Sicilian_Scum_desc
        EffectsDescription Loathes_Sicilian_Scum_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Sicily  3 

;------------------------------------------
Trait Fearsspain
    Characters family
    AntiTraits Hatesspain

    Level Wary_of_Spaniards
        Description Wary_of_Spaniards_desc
        EffectsDescription Wary_of_Spaniards_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Spain -1 

    Level Fears_the_Spanish
        Description Fears_the_Spanish_desc
        EffectsDescription Fears_the_Spanish_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Spain -2 

    Level Terrified_of_the_Spanish
        Description Terrified_of_the_Spanish_desc
        EffectsDescription Terrified_of_the_Spanish_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Spain -3 

;------------------------------------------
Trait Hatesspain
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsspain

    Level Dislikes_the_Spanish
        Description Dislikes_the_Spanish_desc
        EffectsDescription Dislikes_the_Spanish_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Spain  1 

    Level Hates_the_Spanish
        Description Hates_the_Spanish_desc
        EffectsDescription Hates_the_Spanish_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Spain  2 

    Level Loathes_the_Spanish
        Description Loathes_the_Spanish_desc
        EffectsDescription Loathes_the_Spanish_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Spain  3 

;------------------------------------------
Trait Fearsturks
    Characters family
    AntiTraits Hatesturks

    Level Wary_of_the_Turks
        Description Wary_of_the_Turks_desc
        EffectsDescription Wary_of_the_Turks_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Turks -1 

    Level Fears_the_Turks
        Description Fears_the_Turks_desc
        EffectsDescription Fears_the_Turks_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Turks -2 

    Level Terrified_of_the_Turkish
        Description Terrified_of_the_Turkish_desc
        EffectsDescription Terrified_of_the_Turkish_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Turks -3 

;------------------------------------------
Trait Hatesturks
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsturks

    Level Dislikes_the_Turks
        Description Dislikes_the_Turks_desc
        EffectsDescription Dislikes_the_Turks_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Turks  1 

    Level Hates_the_Turks
        Description Hates_the_Turks_desc
        EffectsDescription Hates_the_Turks_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Turks  2 

    Level Loathes_the_Turkish
        Description Loathes_the_Turkish_desc
        EffectsDescription Loathes_the_Turkish_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Turks  3 

;------------------------------------------
Trait Fearsvenice
    Characters family
    AntiTraits Hatesvenice

    Level Wary_of_Venetians
        Description Wary_of_Venetians_desc
        EffectsDescription Wary_of_Venetians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Venice -1 

    Level Fears_Venetians
        Description Fears_Venetians_desc
        EffectsDescription Fears_Venetians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Venice -2 

    Level Terrified_of_Venetians
        Description Terrified_of_Venetians_desc
        EffectsDescription Terrified_of_Venetians_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Venice -3 

;------------------------------------------
Trait Hatesvenice
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Fearsvenice

    Level Dislikes_the_Venetians
        Description Dislikes_the_Venetians_desc
        EffectsDescription Dislikes_the_Venetians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Venice  1 

    Level Hates_the_Venetians
        Description Hates_the_Venetians_desc
        EffectsDescription Hates_the_Venetians_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Venice  2 

    Level Loathes_the_Venetians
        Description Loathes_the_Venetians_desc
        EffectsDescription Loathes_the_Venetians_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Venice  3 

;------------------------------------------
Trait FearsTemplars
    Characters family
    AntiTraits HatesTemplars

    Level Wary_of_Templars
        Description Wary_of_Templars_desc
        EffectsDescription Wary_of_Templars_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Knights_Templar -1 

    Level Fears_Templars
        Description Fears_Templars_desc
        EffectsDescription Fears_Templars_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Knights_Templar -2 

    Level Terrified_of_Templars
        Description Terrified_of_Templars_desc
        EffectsDescription Terrified_of_Templars_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Knights_Templar -3 

;------------------------------------------
Trait HatesTemplars
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsTemplars

    Level Dislikes_the_Templars
        Description Dislikes_the_Templars_desc
        EffectsDescription Dislikes_the_Templars_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Knights_Templar  1 

    Level Hates_the_Templars
        Description Hates_the_Templars_desc
        EffectsDescription Hates_the_Templars_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Knights_Templar  2 

    Level Loathes_the_Templars
        Description Loathes_the_Templars_desc
        EffectsDescription Loathes_the_Templars_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Knights_Templar  3

;------------------------------------------
Trait FearsLithuania
    Characters family
    AntiTraits HatesLithuania

    Level Wary_of_Lithuanians
        Description Wary_of_Lithuanians_desc
        EffectsDescription Wary_of_Lithuanians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Lithuania -1 

    Level Fears_Lithuanians
        Description Fears_Lithuanians_desc
        EffectsDescription Fears_Lithuanians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Lithuania -2 

    Level Terrified_of_Lithuanians
        Description Terrified_of_Lithuanians_desc
        EffectsDescription Terrified_of_Lithuanians_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Lithuania -3 

;------------------------------------------
Trait HatesLithuania
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsLithuania

    Level Dislikes_the_Lithuanians
        Description Dislikes_the_Lithuanians_desc
        EffectsDescription Dislikes_the_Lithuanians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Lithuania  1 

    Level Hates_the_Lithuanians
        Description Hates_the_Lithuanians_desc
        EffectsDescription Hates_the_Lithuanians_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Lithuania  2 

    Level Loathes_the_Lithuanians
        Description Loathes_the_Lithuanians_desc
        EffectsDescription Loathes_the_Lithuanians_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Lithuania  3 

;------------------------------------------
Trait FearsKievian
    Characters family
    AntiTraits HatesKievian

    Level Wary_of_Kievian
        Description Wary_of_Kievian_desc
        EffectsDescription Wary_of_Kievian_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Kievan_Rus -1 

    Level Fears_Kievian
        Description Fears_Kievian_desc
        EffectsDescription Fears_Kievian_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Kievan_Rus -2 

    Level Terrified_of_Kievian
        Description Terrified_of_Kievian_desc
        EffectsDescription Terrified_of_Kievian_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Kievan_Rus -3 

;------------------------------------------
Trait HatesKievian
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsKievian

    Level Dislikes_the_Kievian
        Description Dislikes_the_Kievian_desc
        EffectsDescription Dislikes_the_Kievian_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Kievan_Rus  1 

    Level Hates_the_Kievian
        Description Hates_the_Kievian_desc
        EffectsDescription Hates_the_Kievian_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Kievan_Rus  2 

    Level Loathes_the_Kievian
        Description Loathes_the_Kievian_desc
        EffectsDescription Loathes_the_Kievian_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Kievan_Rus  3 

;------------------------------------------
Trait FearsAragon
    Characters family
    AntiTraits HatesAragon

    Level Wary_of_Aragonese
        Description Wary_of_Aragonese_desc
        EffectsDescription Wary_of_Aragonese_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Aragon -1 

    Level Fears_Aragonese
        Description Fears_Aragonese_desc
        EffectsDescription Fears_Aragonese_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Aragon -2 

    Level Terrified_of_Aragonese
        Description Terrified_of_Aragonese_desc
        EffectsDescription Terrified_of_Aragonese_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Aragon -3 

;------------------------------------------
Trait HatesAragon
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsAragon

    Level Dislikes_the_Aragonese
        Description Dislikes_the_Aragonese_desc
        EffectsDescription Dislikes_the_Aragonese_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Aragon  1 

    Level Hates_the_Aragonese
        Description Hates_the_Aragonese_desc
        EffectsDescription Hates_the_Aragonese_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Aragon  2 

    Level Loathes_the_Aragonese
        Description Loathes_the_Aragonese_desc
        EffectsDescription Loathes_the_Aragonese_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Aragon  3 

;------------------------------------------
Trait FearsTimurids
    Characters family
    AntiTraits HatesTimurids

    Level Wary_of_Timurids
        Description Wary_of_Timurids_desc
        EffectsDescription Wary_of_Timurids_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Timurids -1 

    Level Fears_Timurids
        Description Fears_Timurids_desc
        EffectsDescription Fears_Timurids_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Timurids -2 

    Level Terrified_of_Timurids
        Description Terrified_of_Timurids_desc
        EffectsDescription Terrified_of_Timurids_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Timurids -3 

;------------------------------------------
Trait HatesTimurids
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsTimurids

    Level Dislikes_the_Timurids
        Description Dislikes_the_Timurids_desc
        EffectsDescription Dislikes_the_Timurids_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Timurids  1 

    Level Hates_the_Timurids
        Description Hates_the_Timurids_desc
        EffectsDescription Hates_the_Timurids_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Timurids  2 

    Level Loathes_the_Timurids
        Description Loathes_the_Timurids_desc
        EffectsDescription Loathes_the_Timurids_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Timurids  3 

;------------------------------------------
Trait FearsNorway
    Characters family
    AntiTraits HatesNorway

    Level Wary_of_Norwegians
        Description Wary_of_Norwegians_desc
        EffectsDescription Wary_of_Norwegians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Norway -1 

    Level Fears_Norwegians
        Description Fears_Norwegians_desc
        EffectsDescription Fears_Norwegians_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Norway -2 

    Level Terrified_of_Norwegians
        Description Terrified_of_Norwegians_desc
        EffectsDescription Terrified_of_Norwegians_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Norway -3 

;------------------------------------------
Trait HatesNorway
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsNorway

    Level Dislikes_the_Norwegians
        Description Dislikes_the_Norwegians_desc
        EffectsDescription Dislikes_the_Norwegians_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Norway  1 

    Level Hates_the_Norwegians
        Description Hates_the_Norwegians_desc
        EffectsDescription Hates_the_Norwegians_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Norway  2 

    Level Loathes_the_Norwegians
        Description Loathes_the_Norwegians_desc
        EffectsDescription Loathes_the_Norwegians_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Norway  3 

;------------------------------------------
Trait FearsKwarezm
    Characters family
    AntiTraits HatesKwarezm

    Level Wary_of_Kwarezm
        Description Wary_of_Kwarezm_desc
        EffectsDescription Wary_of_Kwarezm_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Kwarezm -1 

    Level Fears_Kwarezm
        Description Fears_Kwarezm_desc
        EffectsDescription Fears_Kwarezm_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Kwarezm -2 

    Level Terrified_of_Kwarezm
        Description Terrified_of_Kwarezm_desc
        EffectsDescription Terrified_of_Kwarezm_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Kwarezm -3 

;------------------------------------------
Trait HatesKwarezm
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsKwarezm

    Level Dislikes_the_Kwarezm
        Description Dislikes_the_Kwarezm_desc
        EffectsDescription Dislikes_the_Kwarezm_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Kwarezm  1 

    Level Hates_the_Kwarezm
        Description Hates_the_Kwarezm_desc
        EffectsDescription Hates_the_Kwarezm_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Kwarezm  2 

    Level Loathes_the_Kwarezm
        Description Loathes_the_Kwarezm_desc
        EffectsDescription Loathes_the_Kwarezm_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Kwarezm  3 

;------------------------------------------
Trait FearsTO
    Characters family
    AntiTraits HatesTO

    Level Wary_of_TO
        Description Wary_of_TO_desc
        EffectsDescription Wary_of_TO_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Teutonic_Order -1 

    Level Fears_TO
        Description Fears_TO_desc
        EffectsDescription Fears_TO_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Teutonic_Order -2 

    Level Terrified_of_TO
        Description Terrified_of_TO_desc
        EffectsDescription Terrified_of_TO_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Teutonic_Order -3 

;------------------------------------------
Trait HatesTO
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsTO

    Level Dislikes_the_TO
        Description Dislikes_the_TO_desc
        EffectsDescription Dislikes_the_TO_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Teutonic_Order  1 

    Level Hates_the_TO
        Description Hates_the_TO_desc
        EffectsDescription Hates_the_TO_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Teutonic_Order  2 

    Level Loathes_the_TO
        Description Loathes_the_TO_desc
        EffectsDescription Loathes_the_TO_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Teutonic_Order  3 

;------------------------------------------
Trait FearsJerusalem
    Characters family
    AntiTraits HatesJerusalem

    Level Wary_of_Jerusalem
        Description Wary_of_Jerusalem_desc
        EffectsDescription Wary_of_Jerusalem_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Jerusalem -1 

    Level Fears_Jerusalem
        Description Fears_Jerusalem_desc
        EffectsDescription Fears_Jerusalem_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Jerusalem -2 

    Level Terrified_of_Jerusalem
        Description Terrified_of_Jerusalem_desc
        EffectsDescription Terrified_of_Jerusalem_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Faction_Jerusalem -3 

;------------------------------------------
Trait HatesJerusalem
    Characters family
    NoGoingBackLevel  3 
    AntiTraits FearsJerusalem

    Level Dislikes_the_Jerusalem
        Description Dislikes_the_Jerusalem_desc
        EffectsDescription Dislikes_the_Jerusalem_effects_desc
        Threshold  1 

        Effect Combat_V_Faction_Jerusalem  1 

    Level Hates_the_Jerusalem
        Description Hates_the_Jerusalem_desc
        EffectsDescription Hates_the_Jerusalem_effects_desc
        Threshold  2 

        Effect Combat_V_Faction_Jerusalem  2 

    Level Loathes_the_Jerusalem
        Description Loathes_the_Jerusalem_desc
        EffectsDescription Loathes_the_Jerusalem_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Faction_Jerusalem  3 

;------------------------------------------
Trait Fearscatholic
    Characters family
    AntiTraits Hatescatholic

    Level Nervous_Battling_Catholics
        Description Nervous_Battling_Catholics_desc
        EffectsDescription Nervous_Battling_Catholics_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_catholic -1 

    Level Fears_Catholic_Warriors
        Description Fears_Catholic_Warriors_desc
        EffectsDescription Fears_Catholic_Warriors_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_catholic -2 

    Level Terrified_of_Catholic_Warriors
        Description Terrified_of_Catholic_Warriors_desc
        EffectsDescription Terrified_of_Catholic_Warriors_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Religion_catholic -3 

;------------------------------------------
Trait Hatescatholic
    Characters family
    AntiTraits Fearscatholic

    Level Dislikes_Catholics
        Description Dislikes_Catholics_desc
        EffectsDescription Dislikes_Catholics_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_catholic  1 

    Level Hates_Catholics
        Description Hates_Catholics_desc
        EffectsDescription Hates_Catholics_effects_desc
        Threshold  2 

        Effect Combat_V_Religion_catholic  2 

    Level Loathes_Catholics
        Description Loathes_Catholics_desc
        EffectsDescription Loathes_Catholics_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_catholic  3 

;------------------------------------------
Trait Fearsorthodox
    Characters family
    AntiTraits Hatesorthodox

    Level Nervous_Battling_Orthodox
        Description Nervous_Battling_Orthodox_desc
        EffectsDescription Nervous_Battling_Orthodox_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_orthodox -1 

    Level Fears_Orthodox_Warriors
        Description Fears_Orthodox_Warriors_desc
        EffectsDescription Fears_Orthodox_Warriors_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_orthodox -2 

    Level Terrified_of_Orthodox_Warriors
        Description Terrified_of_Orthodox_Warriors_desc
        EffectsDescription Terrified_of_Orthodox_Warriors_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Religion_orthodox -3 

;------------------------------------------
Trait Hatesorthodox
    Characters family
    AntiTraits Fearsorthodox

    Level Dislikes_Orthodox
        Description Dislikes_Orthodox_desc
        EffectsDescription Dislikes_Orthodox_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_orthodox  1 

    Level Hates_Orthodox
        Description Hates_Orthodox_desc
        EffectsDescription Hates_Orthodox_effects_desc
        Threshold  2 

        Effect Combat_V_Religion_orthodox  2 

    Level Loathes_Orthodox
        Description Loathes_Orthodox_desc
        EffectsDescription Loathes_Orthodox_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_orthodox  3 

;------------------------------------------
Trait Fearsislam
    Characters family
    AntiTraits Hatesislam

    Level Wary_of_Muslims
        Description Wary_of_Muslims_desc
        EffectsDescription Wary_of_Muslims_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_islam -1 

    Level Fears_Muslims
        Description Fears_Muslims_desc
        EffectsDescription Fears_Muslims_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_islam -2 

    Level Terrified_of_Islam
        Description Terrified_of_Islam_desc
        EffectsDescription Terrified_of_Islam_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Religion_islam -3 

;------------------------------------------
Trait Hatesislam                            
    Characters family
    AntiTraits Fearsislam

    Level Dislikes_Muslims
        Description Dislikes_Muslims_desc
        EffectsDescription Dislikes_Muslims_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_islam  1 

    Level Hates_Muslims
        Description Hates_Muslims_desc
        EffectsDescription Hates_Muslims_effects_desc
        Threshold  2 

        Effect Combat_V_Religion_islam  2 

    Level Loathes_Muslims
        Description Loathes_Muslims_desc
        EffectsDescription Loathes_Muslims_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_islam  3 

;------------------------------------------
Trait Fearsheretic
    Characters family
    AntiTraits Hatesheretic

    Level Wary_of_Heresy
        Description Wary_of_Heresy_desc
        EffectsDescription Wary_of_Heresy_effects_desc
        Threshold  1 


    Level Fears_Heretics
        Description Fears_Heretics_desc
        EffectsDescription Fears_Heretics_effects_desc
        Threshold  2 


    Level Terrified_of_Heretics
        Description Terrified_of_Heretics_desc
        EffectsDescription Terrified_of_Heretics_effects_desc
        Threshold  4 

;------------------------------------------
Trait Hatesheretic
    Characters family
    AntiTraits Fearsheretic

    Level Dislikes_Heretics
        Description Dislikes_Heretics_desc
        EffectsDescription Dislikes_Heretics_effects_desc
        Threshold  1 

    Level Hates_Heretics
        Description Hates_Heretics_desc
        EffectsDescription Hates_Heretics_effects_desc
        Threshold  2 

    Level Loathes_Heretics
        Description Loathes_Heretics_desc
        EffectsDescription Loathes_Heretics_effects_desc
        Threshold  4 

        Effect TroopMorale -1 

;------------------------------------------
Trait Fearspagan
    Characters family
    AntiTraits Hatespagan

    Level Wary_of_Pagans
        Description Wary_of_Pagans_desc
        EffectsDescription Wary_of_Pagans_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_pagan -1 

    Level Fears_Pagans
        Description Fears_Pagans_desc
        EffectsDescription Fears_Pagans_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_pagan -2 

    Level Terrified_of_Pagan_Ways
        Description Terrified_of_Pagan_Ways_desc
        EffectsDescription Terrified_of_Pagan_Ways_effects_desc
        Threshold  4 

        Effect TroopMorale -2 
        Effect Combat_V_Religion_pagan -3 

;------------------------------------------
Trait Hatespagan
    Characters family
    AntiTraits Fearspagan

    Level Dislikes_Pagans
        Description Dislikes_Pagans_desc
        EffectsDescription Dislikes_Pagans_effects_desc
        Threshold  1 

        Effect Combat_V_Religion_pagan  1 

    Level Hates_Pagans
        Description Hates_Pagans_desc
        EffectsDescription Hates_Pagans_effects_desc
        Threshold  2 

        Effect Combat_V_Religion_pagan  2 

    Level Loathes_Paganism
        Description Loathes_Paganism_desc
        EffectsDescription Loathes_Paganism_effects_desc
        Threshold  4 

        Effect TroopMorale -1 
        Effect Combat_V_Religion_pagan  3


;*********  PERSONALITY TRAITS  *********
;------------------------------------------
Trait ReligionStarter
    Characters family
    Hidden

    Level General_Religion
        Description General_Religion_desc
        EffectsDescription General_Religion_effects_desc
        Threshold  1 

        Effect Piety  3 

;------------------------------------------
Trait LoyaltyStarter
    Characters family
    Hidden

    Level Loyalty_Starting_Value
        Description Loyalty_Starting_Value_desc
        EffectsDescription Loyalty_Starting_Value_effects_desc
        Threshold  1 

        Effect Loyalty  5

;------------------------------------------
Trait Intelligent
    Characters family

    Level Smart
        Description Smart_desc
        EffectsDescription Smart_effects_desc
        Threshold  1 

        Effect Command  1
        Effect Authority  1 
        Effect Trading  2 
        Effect TaxCollection  2 

    Level Intellligent
        Description Intellligent_desc
        EffectsDescription Intellligent_effects_desc
        Threshold  2 

        Effect Command  1
        Effect Authority  2 
        Effect Trading  5 
        Effect TaxCollection  5 

    Level Genius
        Description Genius_desc
        EffectsDescription Genius_effects_desc
        Threshold  4 

        Effect Command  2
        Effect Authority  3 
        Effect Trading  10 
        Effect TaxCollection  10

;------------------------------------------
Trait NaturalMilitarySkill
    Characters family

    Level Talent_for_Command
        Description Talent_for_Command_desc
        EffectsDescription Talent_for_Command_effects_desc
        Threshold  1 

        Effect Command  1 

    Level Natural_Commander
        Description Natural_Commander_desc
        EffectsDescription Natural_Commander_effects_desc
        Threshold  2 

        Effect Command  2 

    Level Born_to_Command
        Description Born_to_Command_desc
        EffectsDescription Born_to_Command_effects_desc
        Threshold  3 

        Effect Command  3 

    Level Born_Conqueror
        Description Born_Conqueror_desc
        EffectsDescription Born_Conqueror_effects_desc
        Threshold  4 

        Effect Command  4

;------------------------------------------
Trait Drink
    Characters family
    ExcludeCultures middle_eastern
    NoGoingBackLevel  5 
    AntiTraits Sobriety

    Level Social_Drinker
        Description Social_Drinker_desc
        EffectsDescription Social_Drinker_effects_desc
        LoseMessage Social_Drinker_lose_desc
        Threshold  1 

        Effect Command  1 
        Effect LocalPopularity  1 

    Level Gets_Merry
        Description Gets_Merry_desc
        EffectsDescription Gets_Merry_effects_desc
        Threshold  2 

        Effect LocalPopularity  1 

    Level Steady_Drinker
        Description Steady_Drinker_desc
        EffectsDescription Steady_Drinker_effects_desc
        Threshold  4 

        Effect Command -1 
        Effect LocalPopularity  1 
        Effect TaxCollection -5

    Level Drunken_Heathen
        Description Drunken_Heathen_desc
        EffectsDescription Drunken_Heathen_effects_desc
        Threshold  8 

        Effect Command -2 
        Effect Authority -1 
        Effect TaxCollection -10

    Level Alcoholic
        Description Alcoholic_desc
        EffectsDescription Alcoholic_effects_desc
        Threshold  16 

        Effect Command -3 
        Effect Authority -3 
        Effect TaxCollection -5 

    Level Paralytic
        Description Paralytic_desc
        EffectsDescription Paralytic_effects_desc
        GainMessage Paralytic_gain_desc
        Epithet Paralytic_epithet_desc
        Threshold  32 

        Effect Command -5 
        Effect Authority -5 
        Effect TaxCollection -10 

;------------------------------------------
Trait Sobriety
    Characters family
    ExcludeCultures middle_eastern
    AntiTraits Drink

    Level Sensible_Drinker
        Description Sensible_Drinker_desc
        EffectsDescription Sensible_Drinker_effects_desc
        Threshold  2 

        Effect Command  1 

    Level Sober
        Description Sober_desc
        EffectsDescription Sober_effects_desc
        Threshold  4 

        Effect Command  1 
        Effect TroopMorale -1 
        Effect PersonalSecurity  1 
        Effect LocalPopularity -1 

    Level Abhors_Drink
        Description Abhors_Drink_desc
        EffectsDescription Abhors_Drink_effects_desc
        Threshold  8 

        Effect Command  1 
        Effect TroopMorale -2 
        Effect PersonalSecurity  2 
        Effect LocalPopularity -2

;------------------------------------------
Trait Feck
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Prim

    Level Strong_Language
        Description Strong_Language_desc
        EffectsDescription Strong_Language_effects_desc
        Threshold  2 

        Effect Piety -1 
        Effect Command  1 
        Effect TroopMorale  1 

    Level Foul_Mouthed
        Description Foul_Mouthed_desc
        EffectsDescription Foul_Mouthed_effects_desc
        Threshold  4 

        Effect Chivalry -1 
        Effect Piety -2 
        Effect Command  1 
        Effect TroopMorale  2 

    Level Spits_Venom
        Description Spits_Venom_desc
        EffectsDescription Spits_Venom_effects_desc
        Threshold  6 

        Effect Chivalry -2 
        Effect Piety -3 
        Effect Loyalty -1 
        Effect Authority -1 
        Effect TroopMorale  3 

    Level Utterly_Profane
        Description Utterly_Profane_desc
        EffectsDescription Utterly_Profane_effects_desc
        GainMessage Utterly_Profane_gain_desc
        Epithet Utterly_Profane_epithet_desc
        Threshold  8 

        Effect Chivalry -4 
        Effect Piety -4
        Effect Loyalty -2 
        Effect Authority -2 
        Effect TroopMorale  4 

;------------------------------------------
Trait Arse
    Characters family
    NoGoingBackLevel  2 

    Level Uninhibited
        Description Uninhibited_desc
        EffectsDescription Uninhibited_effects_desc
        Threshold  1 

        Effect Authority -1 

    Level Shameful
        Description Shameful_desc
        EffectsDescription Shameful_effects_desc
        Threshold  4 

        Effect Authority -2 

    Level Too_Well_Groomed
        Description Too_Well_Groomed_desc
        EffectsDescription Too_Well_Groomed_effects_desc
        Threshold  8 

        Effect Command -1 
        Effect Authority -3 

    Level Shameless_Queen
        Description Shameless_Queen_desc
        EffectsDescription Shameless_Queen_effects_desc
        Epithet Shameless_Queen_epithet_desc
        Threshold  16 

        Effect Command -3 
        Effect Authority -5 

;------------------------------------------
Trait Girls
    Characters family
    AntiTraits Prim, Upright

    Level Red_Blooded
        Description Red_Blooded_desc
        EffectsDescription Red_Blooded_effects_desc
        Threshold  2 

        Effect TroopMorale  2 

    Level Womaniser
        Description Womaniser_desc
        EffectsDescription Womaniser_effects_desc
        Threshold  4 

        Effect TroopMorale  1 

    Level Adulterer
        Description Adulterer_desc
        EffectsDescription Adulterer_effects_desc
        Threshold  8 


    Level Lecherous_Fiend
        Description Lecherous_Fiend_desc
        EffectsDescription Lecherous_Fiend_effects_desc
        Threshold  16 

        Effect Chivalry -1 
        Effect TroopMorale -1 

    Level Sexual_Predator
        Description Sexual_Predator_desc
        EffectsDescription Sexual_Predator_effects_desc
        Epithet Sexual_Predator_epithet_desc
        Threshold  36 

        Effect Chivalry -2 
        Effect TroopMorale -2 

;------------------------------------------
Trait Brave
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Coward, Haemophobic

    Level Brave
        Description Brave_desc
        EffectsDescription Brave_effects_desc
        Threshold  1 

        Effect TroopMorale  1 

    Level Dauntless
        Description Dauntless_desc
        EffectsDescription Dauntless_effects_desc
        Threshold  2 

        Effect TroopMorale  2 
        Effect HitPoints  1 

    Level Courageous
        Description Courageous_desc
        EffectsDescription Courageous_effects_desc
        Threshold  4 

        Effect TroopMorale  3 
        Effect HitPoints  2 

    Level Inspirationally_Brave
        Description Inspirationally_Brave_desc
        EffectsDescription Inspirationally_Brave_effects_desc
        Epithet Inspirationally_Brave_epithet_desc
        Threshold  8 

        Effect Authority  1 
        Effect TroopMorale  4
        Effect HitPoints  2 

    Level Has_no_Fear
        Description Has_no_Fear_desc
        EffectsDescription Has_no_Fear_effects_desc
        GainMessage Has_no_Fear_gain_desc
        Epithet Has_no_Fear_epithet_desc
        Threshold  16 

        Effect Authority  2 
        Effect TroopMorale  2
        Effect HitPoints  3 

;------------------------------------------
Trait Coward
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Brave

    Level Faltering_Courage
        Description Faltering_Courage_desc
        EffectsDescription Faltering_Courage_effects_desc
        GainMessage Faltering_Courage_gain_desc
        LoseMessage Faltering_Courage_lose_desc
        Threshold  2 

        Effect TroopMorale -1 

    Level Fears_Conflict
        Description Fears_Conflict_desc
        EffectsDescription Fears_Conflict_effects_desc
        Threshold  4 

        Effect TroopMorale -2 

    Level Cowardly
        Description Cowardly_desc
        EffectsDescription Cowardly_effects_desc
        Threshold  6 

        Effect TroopMorale -3 

    Level Slave_to_Fear
        Description Slave_to_Fear_desc
        EffectsDescription Slave_to_Fear_effects_desc
        Epithet Slave_to_Fear_epithet_desc
        Threshold  8 

        Effect TroopMorale -4 

;------------------------------------------
Trait Slothful
    Characters family
    AntiTraits Energetic

    Level Lazy
        Description Lazy_desc
        EffectsDescription Lazy_effects_desc
        Threshold  1 

        Effect MovementPoints -1
        Effect TaxCollection -2

    Level Too_Comfortable
        Description Too_Comfortable_desc
        EffectsDescription Too_Comfortable_effects_desc
    Epithet Slothful_epithet_desc
        Threshold  2 

        Effect MovementPoints -1
        Effect TaxCollection -5 

    Level Slothful
        Description Slothful_desc
        EffectsDescription Slothful_effects_desc
        Threshold  4 

        Effect Authority -1 
        Effect MovementPoints -1
        Effect TaxCollection -10 

    Level Indolent_Lump
        Description Indolent_Lump_desc
        EffectsDescription Indolent_Lump_effects_desc
        Epithet Indolent_Lump_epithet_desc
        Threshold  8 

        Effect Authority -2 
        Effect MovementPoints -1
        Effect TaxCollection -15 

;------------------------------------------
Trait Energetic
    Characters family
    AntiTraits Slothful

    Level Eager
        Description Eager_desc
        EffectsDescription Eager_effects_desc
        Threshold  1 

        Effect MovementPoints  1

    Level Energetic
        Description Energetic_desc
        EffectsDescription Energetic_effects_desc
        Threshold  2 

        Effect MovementPoints  2

    Level Driven
        Description Driven_desc
        EffectsDescription Driven_effects_desc
        Threshold  4 

        Effect Authority  1 
        Effect MovementPoints  2

    Level Blessed_With_Vigor
        Description Blessed_With_Vigor_desc
        EffectsDescription Blessed_With_Vigor_effects_desc
        Threshold  8 

        Effect Authority  2 
        Effect MovementPoints  2

;------------------------------------------
Trait Xenophobia
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Xenophilia

    Level Nervous_of_Outsiders
        Description Nervous_of_Outsiders_desc
        EffectsDescription Nervous_of_Outsiders_effects_desc
        Threshold  2 

        Effect PublicSecurity  1 

    Level Distrusts_Foreigners
        Description Distrusts_Foreigners_desc
        EffectsDescription Distrusts_Foreigners_effects_desc
        Threshold  6 

        Effect PublicSecurity  2 

    Level Total_Bigot
        Description Total_Bigot_desc
        EffectsDescription Total_Bigot_effects_desc
        Threshold  12 

        Effect PublicSecurity  3 

;------------------------------------------
Trait Xenophilia
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Xenophobia

    Level Tolerant_to_Foreigners
        Description Tolerant_to_Foreigners_desc
        EffectsDescription Tolerant_to_Foreigners_effects_desc
        Threshold  2 

        Effect PublicSecurity -1 

    Level Welcomes_Outlanders
        Description Welcomes_Outlanders_desc
        EffectsDescription Welcomes_Outlanders_effects_desc
        Threshold  6 

        Effect PublicSecurity -2 

    Level Fascinated_by_Foreigners
        Description Fascinated_by_Foreigners_desc
        EffectsDescription Fascinated_by_Foreigners_effects_desc
        Threshold  12 

        Effect PublicSecurity -3 

;------------------------------------------
Trait PublicAtheism
    Characters family
    ExcludeCultures middle_eastern
    NoGoingBackLevel  2 
    AntiTraits PublicFaith

    Level Religiously_Improper
        Description Religiously_Improper_desc
        EffectsDescription Religiously_Improper_effects_desc
        Threshold  2 

        Effect Piety -1 
        Effect Unrest  1 

    Level Humanist
        Description Humanist_desc
        EffectsDescription Humanist_effects_desc
        Threshold  5 

        Effect Piety -2 
        Effect Unrest  4 

    Level Athiest
        Description Athiest_desc
        EffectsDescription Athiest_effects_desc
        Threshold  12 

        Effect Piety -3 
        Effect Unrest  6 

    Level Despises_Religion
        Description Despises_Religion_desc
        EffectsDescription Despises_Religion_effects_desc
        Epithet Despises_Religion_epithet_desc
        Threshold  20 

        Effect Piety -5 
        Effect Unrest  8 

;------------------------------------------
Trait PublicFaith
    Characters family
    NoGoingBackLevel  2 
    AntiTraits PublicAtheism

    Level Religiously_Proper
        Description Religiously_Proper_desc
        EffectsDescription Religiously_Proper_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Religiously_Minded
        Description Religiously_Minded_desc
        EffectsDescription Religiously_Minded_effects_desc
        Threshold  2 

        Effect Piety  2
        Effect LocalPopularity 1 

    Level Religiously_Devout
        Description Religiously_Devout_desc
        EffectsDescription Religiously_Devout_effects_desc
        Threshold  4 

        Effect Piety  3 
        Effect LocalPopularity 2 

    Level Pious_Ruler
        Description Pious_Ruler_desc
        EffectsDescription Pious_Ruler_effects_desc
        Epithet Pious_Ruler_epithet_desc
        Threshold  8 

        Effect Piety  5 
        Effect LocalPopularity 2 
        Effect Authority 1 

;------------------------------------------
Trait GoodAdministrator
    Characters family
    NoGoingBackLevel  3 
    AntiTraits BadAdministrator

    Level Budding_Bureaucrat
        Description Budding_Bureaucrat_desc
        EffectsDescription Budding_Bureaucrat_effects_desc
        Threshold  6 

        Effect Trading  3 
        Effect Law  1 

    Level Skilled_Bureaucrat
        Description Skilled_Bureaucrat_desc
        EffectsDescription Skilled_Bureaucrat_effects_desc
        Threshold  12 

        Effect Trading  5 
        Effect Law  2 

    Level Superb_Administrator
        Description Superb_Administrator_desc
        EffectsDescription Superb_Administrator_effects_desc
        Threshold  24 

        Effect Trading  10 
        Effect Law  3 

;------------------------------------------
Trait BadAdministrator
    Characters family
    AntiTraits GoodAdministrator

    Level Poor_Administrator
        Description Poor_Administrator_desc
        EffectsDescription Poor_Administrator_effects_desc
        Threshold  2 

        Effect Trading -3 

    Level Inefficient_Administrator
        Description Inefficient_Administrator_desc
        EffectsDescription Inefficient_Administrator_effects_desc
        Threshold  4 

        Effect Trading -5 

    Level Total_Incompetence
        Description Total_Incompetence_desc
        EffectsDescription Total_Incompetence_effects_desc
        Threshold  6 

        Effect Trading -10 


;------------------------------------------
Trait Epicurean
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Stoic

    Level Refined_Tastes
        Description Refined_Tastes_desc
        EffectsDescription Refined_Tastes_effects_desc
        Threshold  1 

        Effect Trading  2 
        Effect BribeResistance -5 

    Level Expensive_Tastes
        Description Expensive_Tastes_desc
        EffectsDescription Expensive_Tastes_effects_desc
        Threshold  2 

        Effect Trading  5 
        Effect BribeResistance -10 

    Level Exotic_Tastes
        Description Exotic_Tastes_desc
        EffectsDescription Exotic_Tastes_effects_desc
        Threshold  4 

        Effect Trading  10 
        Effect BribeResistance -15

;------------------------------------------
Trait Stoic
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Epicurean

    Level Reserved
        Description Reserved_desc
        EffectsDescription Reserved_effects_desc
        Threshold  1 

        Effect BribeResistance  10 

    Level Stone_Faced
        Description Stone_Faced_desc
        EffectsDescription Stone_Faced_effects_desc
        Threshold  2 

        Effect Loyalty  1 
        Effect BribeResistance  20 

    Level Utterly_Stoic
        Description Utterly_Stoic_desc
        EffectsDescription Utterly_Stoic_effects_desc
        Threshold  4 

        Effect Loyalty  2 
        Effect BribeResistance  30 

;------------------------------------------
Trait Austere
    Characters family
    NoGoingBackLevel  2 
    AntiTraits ExpensiveTastes, Aesthetic

    Level Severe
        Description Severe_desc
        EffectsDescription Severe_effects_desc
        Threshold  1 

        Effect BribeResistance  10 
        Effect TaxCollection  2 

    Level Austere
        Description Austere_desc
        EffectsDescription Austere_effects_desc
        Threshold  2 

        Effect Loyalty  1 
        Effect BribeResistance  20 
        Effect TaxCollection  5 

    Level Severely_Austere
        Description Severely_Austere_desc
        EffectsDescription Severely_Austere_effects_desc
        Threshold  4 

        Effect Loyalty  2 
        Effect BribeResistance  30 
        Effect TaxCollection  10 

;------------------------------------------
Trait Aesthetic
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Austere

    Level An_Eye_for_Beauty
        Description An_Eye_for_Beauty_desc
        EffectsDescription An_Eye_for_Beauty_effects_desc
        Threshold  2 

        Effect Command -1 

    Level Admirer_of_Beauty
        Description Admirer_of_Beauty_desc
        EffectsDescription Admirer_of_Beauty_effects_desc
        Threshold  4 

        Effect Command -2 
        Effect BribeResistance -1 
        Effect Squalor -1 

    Level Aesthete
        Description Aesthete_desc
        EffectsDescription Aesthete_effects_desc
        Threshold  8 

        Effect Command -3 
        Effect BribeResistance -2 
        Effect Squalor -2 

;------------------------------------------
Trait Ignorance
    Characters family
    NoGoingBackLevel  2 
    AntiTraits MathematicsSkill

    Level Ignorant
        Description Ignorant_desc
        EffectsDescription Ignorant_effects_desc
        Threshold  5 

        Effect Authority -1 
        Effect Trading -2 
        Effect TaxCollection -2 

    Level Sadly_Ignorant
        Description Sadly_Ignorant_desc
        EffectsDescription Sadly_Ignorant_effects_desc
        Threshold  10 

        Effect Authority -1 
        Effect Trading -5 
        Effect TaxCollection -5 

    Level Blissfully_Ignorant
        Description Blissfully_Ignorant_desc
        EffectsDescription Blissfully_Ignorant_effects_desc
        Threshold  20 

        Effect Authority -2 
        Effect Trading -10 
        Effect TaxCollection -10 

;------------------------------------------
Trait Gambling
    Characters family

    Level Enjoys_a_Wager
        Description Enjoys_a_Wager_desc
        EffectsDescription Enjoys_a_Wager_effects_desc
        Threshold  2 

        Effect Trading -5 
        Effect BribeResistance -1 

    Level Gambler
        Description Gambler_desc
        EffectsDescription Gambler_effects_desc
        Threshold  4 

        Effect Trading -10 
        Effect BribeResistance -2 

    Level Problem_Gambler
        Description Problem_Gambler_desc
        EffectsDescription Problem_Gambler_effects_desc
        Threshold  8 

        Effect Trading -15 
        Effect BribeResistance -3 

    Level Slave_to_Luck
        Description Slave_to_Luck_desc
        EffectsDescription Slave_to_Luck_effects_desc
        Epithet Slave_to_Luck_epithet_desc
        Threshold  12 

        Effect Trading -20 
        Effect BribeResistance -4 

;------------------------------------------
Trait SpyMaster
    Characters family

    Level Espionage
        Description Espionage_desc
        EffectsDescription Espionage_effects_desc
        Threshold  8 

        Effect TrainingAgents  2 

    Level Espionage_Expert
        Description Espionage_Expert_desc
        EffectsDescription Espionage_Expert_effects_desc
        Threshold  16 

        Effect PublicSecurity  1 
        Effect TrainingAgents  4 

    Level Master_of_Espionage
        Description Master_of_Espionage_desc
        EffectsDescription Master_of_Espionage_effects_desc
        Epithet Master_of_Espionage_epithet_desc
        Threshold  24 

        Effect Chivalry -1 
        Effect PublicSecurity  2 
        Effect TrainingAgents  6 

;------------------------------------------
Trait AssassinMaster
    Characters family

    Level Open_to_Murder
        Description Open_to_Murder_desc
        EffectsDescription Open_to_Murder_effects_desc
        Threshold  5 

        Effect Chivalry -1 
        Effect TrainingAgents  2 

    Level Mixes_with_Killers
        Description Mixes_with_Killers_desc
        EffectsDescription Mixes_with_Killers_effects_desc
        Threshold  10 

        Effect Chivalry -2 
        Effect PersonalSecurity  1 
        Effect TrainingAgents  4 

    Level Master_of_Assassins
        Description Master_of_Assassins_desc
        EffectsDescription Master_of_Assassins_effects_desc
        GainMessage Master_of_Assassins_gain_desc
        Epithet Master_of_Assassins_epithet_desc
        Threshold  15 

        Effect Chivalry -3 
        Effect PersonalSecurity  2 
        Effect TrainingAgents  5 

;------------------------------------------
Trait CounterSpy
    Characters family

    Level Counter-Spy
        Description Counter-Spy_desc
        EffectsDescription Counter-Spy_effects_desc
        Threshold  2 

        Effect PublicSecurity  2 

    Level Counter-Espionage
        Description Counter-Espionage_desc
        EffectsDescription Counter-Espionage_effects_desc
        Threshold  4 

        Effect PublicSecurity  3 

    Level Spycatcher
        Description Spycatcher_desc
        EffectsDescription Spycatcher_effects_desc
        Threshold  6 

        Effect Chivalry  1 
        Effect LineOfSight  1 
        Effect PublicSecurity  4 

;------------------------------------------
Trait AssassinCatcher
    Characters family

    Level Survivor
        Description Survivor_desc
        EffectsDescription Survivor_effects_desc
        Threshold  2 

        Effect Chivalry  1 
        Effect PersonalSecurity  2 

    Level Blessed_Survivor
        Description Blessed_Survivor_desc
        EffectsDescription Blessed_Survivor_effects_desc
        Threshold  4 

        Effect Chivalry  1 
        Effect PersonalSecurity  3 

    Level Instinctive_Survivor
        Description Instinctive_Survivor_desc
        EffectsDescription Instinctive_Survivor_effects_desc
        Epithet Instinctive_Survivor_epithet_desc
        Threshold  8 

        Effect Chivalry  2 
        Effect LineOfSight  1 
        Effect PersonalSecurity  4  

;------------------------------------------
Trait LaxPersonalSecurity
    Characters all
    NoGoingBackLevel  3 
    AntiTraits HighPersonalSecurity, Paranoia

    Level Unconcerned
        Description Unconcerned_desc
        EffectsDescription Unconcerned_effects_desc
        Threshold  1 

        Effect PersonalSecurity -1 

    Level Lacks_Caution
        Description Lacks_Caution_desc
        EffectsDescription Lacks_Caution_effects_desc
        Threshold  3 

        Effect PersonalSecurity -2 

    Level No_Sense_of_Mortality
        Description No_Sense_of_Mortality_desc
        EffectsDescription No_Sense_of_Mortality_effects_desc
        Threshold  6 

        Effect PersonalSecurity -4 

;------------------------------------------
Trait HighPersonalSecurity
    Characters all
    NoGoingBackLevel  2 
    AntiTraits LaxPersonalSecurity

    Level Mindful_of_Risks
        Description Mindful_of_Risks_desc
        EffectsDescription Mindful_of_Risks_effects_desc
        Threshold  1 

        Effect PersonalSecurity  1 

    Level Healthy_Caution
        Description Healthy_Caution_desc
        EffectsDescription Healthy_Caution_effects_desc
        Threshold  2 

        Effect PersonalSecurity  2 

    Level Morbidly_Mortal
        Description Morbidly_Mortal_desc
        EffectsDescription Morbidly_Mortal_effects_desc
        Threshold  3 

        Effect PersonalSecurity  4 

;------------------------------------------
Trait Trusting
    Characters family
    AntiTraits Paranoia

    Level Naive
        Description Naive_desc
        EffectsDescription Naive_effects_desc
        Threshold  1 

        Effect PersonalSecurity -1 

    Level Trusting
        Description Trusting_desc
        EffectsDescription Trusting_effects_desc
        Threshold  2 

        Effect PersonalSecurity -2 

    Level Overly_Trusting
        Description Overly_Trusting_desc
        EffectsDescription Overly_Trusting_effects_desc
        Threshold  6 

        Effect PersonalSecurity -3 

;------------------------------------------
Trait Paranoia
    Characters family
    AntiTraits Trusting, LaxPersonalSecurity

    Level Slow_to_Trust
        Description Slow_to_Trust_desc
        EffectsDescription Slow_to_Trust_effects_desc
        Threshold  1 

        Effect PersonalSecurity  1 

    Level Overly_Suspicious
        Description Overly_Suspicious_desc
        EffectsDescription Overly_Suspicious_effects_desc
        Threshold  2 

        Effect PersonalSecurity  2 

    Level Paranoid
        Description Paranoid_desc
        EffectsDescription Paranoid_effects_desc
        Threshold  4 

        Effect Command -1 
        Effect Authority -1 
        Effect PersonalSecurity  3 

    Level Completely_Paranoid
        Description Completely_Paranoid_desc
        EffectsDescription Completely_Paranoid_effects_desc
        Threshold  8 

        Effect Command -2 
        Effect Authority -2 
        Effect PersonalSecurity  4 

;------------------------------------------
Trait Liar
    Characters family
    AntiTraits Upright

    Level Avoids_the_Truth
        Description Avoids_the_Truth_desc
        EffectsDescription Avoids_the_Truth_effects_desc
        Threshold  1 

        Effect Authority  1 

    Level Bends_the_Truth
        Description Bends_the_Truth_desc
        EffectsDescription Bends_the_Truth_effects_desc
        Threshold  2 

        Effect Authority -1 

    Level Liar
        Description Liar_desc
        EffectsDescription Liar_effects_desc
        Threshold  4 

        Effect Authority -2 

    Level Pathological_Liar
        Description Pathological_Liar_desc
        EffectsDescription Pathological_Liar_effects_desc
        Epithet Pathological_Liar_epithet_desc
        Threshold  8 

        Effect Authority -3 

;------------------------------------------
Trait Embezzler
    Characters family
    AntiTraits Upright

    Level Deep_Pockets
        Description Deep_Pockets_desc
        EffectsDescription Deep_Pockets_effects_desc
        Threshold  1 

        Effect TaxCollection -10 

    Level Fraudulent
        Description Fraudulent_desc
        EffectsDescription Fraudulent_effects_desc
        Threshold  3 

        Effect TaxCollection -20 

    Level Embezzler
        Description Embezzler_desc
        EffectsDescription Embezzler_effects_desc
        Threshold  6 

        Effect TaxCollection -30 

;------------------------------------------
Trait DeceiverVirtue
    Characters family

    Level Convincing
        Description Convincing_desc
        EffectsDescription Convincing_effects_desc
        Threshold  2 

        Effect Loyalty -1 
        Effect Authority  1 

    Level Deceptive
        Description Deceptive_desc
        EffectsDescription Deceptive_effects_desc
        Threshold  4 

        Effect Loyalty -2 
        Effect Authority  2 

    Level Total_Deceiver
        Description Total_Deceiver_desc
        EffectsDescription Total_Deceiver_effects_desc
        Epithet Total_Deceiver_epithet_desc
        Threshold  8 

        Effect Loyalty -3 
        Effect Authority  3 

;------------------------------------------
Trait Upright
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Corrupt, Embezzler, Liar, Girls

    Level Honest
        Description Honest_desc
        EffectsDescription Honest_effects_desc
        Threshold  1 

        Effect Loyalty  1 
        Effect BribeResistance  10 
        Effect Law  2 

    Level Trustworthy
        Description Trustworthy_desc
        EffectsDescription Trustworthy_effects_desc
        Threshold  2 

        Effect Loyalty  2 
        Effect BribeResistance  20 
        Effect Law  4 

    Level Utterly_Immaculate
        Description Utterly_Immaculate_desc
        EffectsDescription Utterly_Immaculate_effects_desc
        Epithet Utterly_Immaculate_epithet_desc
        Threshold  4 

        Effect Loyalty  3 
        Effect BribeResistance  30 
        Effect Law  6 

;------------------------------------------
Trait Corrupt
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Upright

    Level Dubious
        Description Dubious_desc
        EffectsDescription Dubious_effects_desc
        Threshold  1 

        Effect BribeResistance -2 
        Effect TaxCollection -10 
        Effect Law -1 

    Level Underhanded
        Description Underhanded_desc
        EffectsDescription Underhanded_effects_desc
        Threshold  3 

        Effect Loyalty -1 
        Effect BribeResistance -4 
        Effect TaxCollection -20 
        Effect Law -2 

    Level Corrupt
        Description Corrupt_desc
        EffectsDescription Corrupt_effects_desc
        Threshold  6 

        Effect Loyalty -2 
        Effect BribeResistance -6 
        Effect TaxCollection -30 
        Effect Law -3 

;------------------------------------------
Trait Authoritarian
    Characters family
    NoGoingBackLevel  1 
    AntiTraits NonAuthoritarian

    Level Firm_Ruler
        Description Firm_Ruler_desc
        EffectsDescription Firm_Ruler_effects_desc
        Threshold  1 

        Effect Unrest  1 
        Effect Law  2 

    Level Strict_Ruler
        Description Strict_Ruler_desc
        EffectsDescription Strict_Ruler_effects_desc
        Threshold  3 

        Effect Authority  1 
        Effect Unrest  2 
        Effect Law  4 

    Level Total_Authoritarian
        Description Total_Authoritarian_desc
        EffectsDescription Total_Authoritarian_effects_desc
        Epithet Total_Authoritarian_epithet_desc
        Threshold  8 

        Effect Authority  2 
        Effect Unrest  3 
        Effect Law  6 

;------------------------------------------
Trait NonAuthoritarian
    Characters family
    NoGoingBackLevel  1 
    AntiTraits Authoritarian

    Level Fair_Ruler
        Description Fair_Ruler_desc
        EffectsDescription Fair_Ruler_effects_desc
        Threshold  3 

        Effect Unrest -2 
        Effect Law -1 

    Level Understanding_Ruler
        Description Understanding_Ruler_desc
        EffectsDescription Understanding_Ruler_effects_desc
        Threshold  4 

        Effect Authority -1 
        Effect Unrest -4 
        Effect Law -2 

    Level Liberal_Leader
        Description Liberal_Leader_desc
        EffectsDescription Liberal_Leader_effects_desc
        Epithet Liberal_Leader_epithet_desc
        Threshold  6 

        Effect Authority -2 
        Effect Unrest -6 
        Effect Law -3 

;------------------------------------------
Trait Disloyal
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Loyal

    Level Speaks_of_Loyalty
        Description Speaks_of_Loyalty_desc
        EffectsDescription Speaks_of_Loyalty_effects_desc
        Threshold  1 

        Effect Loyalty -1 

    Level Mixed_Loyalties
        Description Mixed_Loyalties_desc
        EffectsDescription Mixed_Loyalties_effects_desc
        Threshold  2 

        Effect Loyalty -2 

    Level Disloyal
        Description Disloyal_desc
        EffectsDescription Disloyal_effects_desc
        Threshold  3 

        Effect Chivalry -1 
        Effect Loyalty -3 

    Level Actively_Disloyal
        Description Actively_Disloyal_desc
        EffectsDescription Actively_Disloyal_effects_desc
        Threshold  4 

        Effect Chivalry -2 
        Effect Loyalty -4 

;------------------------------------------
Trait Loyal
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Disloyal

    Level Generally_Loyal
        Description Generally_Loyal_desc
        EffectsDescription Generally_Loyal_effects_desc
        Threshold  1 

        Effect Loyalty  1 

    Level Loyal
        Description Loyal_desc
        EffectsDescription Loyal_effects_desc
        Threshold  2 

        Effect Chivalry  1 
        Effect Loyalty  2 

    Level Very_Loyal
        Description Very_Loyal_desc
        EffectsDescription Very_Loyal_effects_desc
        Threshold  4 

        Effect Chivalry  2 
        Effect Loyalty  3 

    Level Loyal_Beyond_Question
        Description Loyal_Beyond_Question_desc
        EffectsDescription Loyal_Beyond_Question_effects_desc
        Threshold  6 

        Effect Chivalry  3 
        Effect Loyalty  4 

;------------------------------------------
Trait Cuckold
    Characters family
    NoGoingBackLevel  1 

    Level Trouble_at_Home
        Description Trouble_at_Home_desc
        EffectsDescription Trouble_at_Home_effects_desc
        Threshold  2 

        Effect Authority -1 

    Level Cuckold
        Description Cuckold_desc
        EffectsDescription Cuckold_effects_desc
        Threshold  3 

        Effect Authority -2 

    Level Laughing_Stock
        Description Laughing_Stock_desc
        EffectsDescription Laughing_Stock_effects_desc
        Threshold  4 

        Effect Authority -3 

    Level Lacks_Manhood
        Description Lacks_Manhood_desc
        EffectsDescription Lacks_Manhood_effects_desc
        Epithet Lacks_Manhood_epithet_desc
        Threshold  5 

        Effect Authority -4 

;------------------------------------------
Trait GoodFarmer
    Characters family
    NoGoingBackLevel  3 

    Level Farming_Knowledge
        Description Farming_Knowledge_desc
        EffectsDescription Farming_Knowledge_effects_desc
        Threshold  3 

        Effect Farming  1 

    Level Rural_Expert
        Description Rural_Expert_desc
        EffectsDescription Rural_Expert_effects_desc
        Threshold  6 

        Effect Farming  2 

    Level Agriculturalist
        Description Agriculturalist_desc
        EffectsDescription Agriculturalist_effects_desc
        Threshold  12 

        Effect Farming  3 

;------------------------------------------
Trait GoodMiner
    Characters family
    NoGoingBackLevel  2 

    Level Mining_Knowledge
        Description Mining_Knowledge_desc
        EffectsDescription Mining_Knowledge_effects_desc
        Threshold  2 

        Effect Mining  10 

    Level Mining_Expert
        Description Mining_Expert_desc
        EffectsDescription Mining_Expert_effects_desc
        Threshold  4 

        Effect Mining  20 

    Level Geologist
        Description Geologist_desc
        EffectsDescription Geologist_effects_desc
        Threshold  8 

        Effect Mining  30 

;------------------------------------------
Trait GoodEngineer
    Characters family
    NoGoingBackLevel  2 
    AntiTraits BadEngineer

    Level Admires_Technology
        Description Admires_Technology_desc
        EffectsDescription Admires_Technology_effects_desc
        Threshold  1 

        Effect SiegeEngineering  20 

    Level Mechanically_Minded
        Description Mechanically_Minded_desc
        EffectsDescription Mechanically_Minded_effects_desc
        Threshold  3 

        Effect SiegeAttack  1 
        Effect SiegeEngineering  40 

    Level Engineer
        Description Engineer_desc
        EffectsDescription Engineer_effects_desc
        GainMessage Engineer_gain_desc
        Epithet Engineer_epithet_desc
        Threshold  6 

        Effect SiegeAttack  2 
        Effect SiegeEngineering  60 

;------------------------------------------
Trait BadEngineer
    Characters family
    NoGoingBackLevel  2 
    AntiTraits GoodEngineer

    Level Questions_Technology
        Description Questions_Technology_desc
        EffectsDescription Questions_Technology_effects_desc
        Threshold  1 

        Effect SiegeAttack -1 

    Level Befuddled_by_Machines
        Description Befuddled_by_Machines_desc
        EffectsDescription Befuddled_by_Machines_effects_desc
        Threshold  3 

        Effect SiegeAttack -2 

    Level Distrusts_Evil_Machinery!
        Description Distrusts_Evil_Machinery!_desc
        EffectsDescription Distrusts_Evil_Machinery!_effects_desc
        Threshold  6 

        Effect SiegeAttack -3 

;------------------------------------------
Trait GoodTrader
    Characters family
    NoGoingBackLevel  2 
    AntiTraits BadTrader

    Level Understands_Trade
        Description Understands_Trade_desc
        EffectsDescription Understands_Trade_effects_desc
        Threshold  12 

        Effect Trading  10 

    Level Trader
        Description Trader_desc
        EffectsDescription Trader_effects_desc
        Threshold  24 

        Effect Trading  20 

    Level Master_Trader
        Description Master_Trader_desc
        EffectsDescription Master_Trader_effects_desc
        Threshold  48 

        Effect Trading  30 


;------------------------------------------
Trait BadTrader
    Characters family
    NoGoingBackLevel  2 
    AntiTraits GoodTrader

    Level Fiscally_Challenged
        Description Fiscally_Challenged_desc
        EffectsDescription Fiscally_Challenged_effects_desc
        Threshold  1 

        Effect Trading -10 

    Level Incompetent_Trader
        Description Incompetent_Trader_desc
        EffectsDescription Incompetent_Trader_effects_desc
        Threshold  3 

        Effect Trading -20 

    Level Trading_Liability
        Description Trading_Liability_desc
        EffectsDescription Trading_Liability_effects_desc
        Threshold  6 

        Effect Trading -30 

;------------------------------------------
Trait Just
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Unjust, HarshJustice, LenientJustice

    Level A_Sense_of_Justice
        Description A_Sense_of_Justice_desc
        EffectsDescription A_Sense_of_Justice_effects_desc
        Threshold  1 

        Effect Chivalry  1 
        Effect Law  1 

    Level Just
        Description Just_desc
        EffectsDescription Just_effects_desc
        Threshold  3 

        Effect Chivalry  2 
        Effect Law  2 

    Level Serves_Justice
        Description Serves_Justice_desc
        EffectsDescription Serves_Justice_effects_desc
        Epithet Serves_Justice_epithet_desc
        Threshold  7 

        Effect Chivalry  3 
        Effect Law  3 

;------------------------------------------
Trait Unjust
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Just, LenientJustice

    Level Swift_to_Judge
        Description Swift_to_Judge_desc
        EffectsDescription Swift_to_Judge_effects_desc
        Threshold  1 

        Effect Unrest  1 

    Level Lacks_Justice
        Description Lacks_Justice_desc
        EffectsDescription Lacks_Justice_effects_desc
        Threshold  3 

        Effect Chivalry -1 
        Effect Unrest  2 

    Level Unjust
        Description Unjust_desc
        EffectsDescription Unjust_effects_desc
        Threshold  7 

        Effect Chivalry -3 
        Effect Unrest  3 

;------------------------------------------
Trait HarshJustice
    Characters family
    NoGoingBackLevel  1 
    AntiTraits LenientJustice, Just

    Level Hard_Justice
        Description Hard_Justice_desc
        EffectsDescription Hard_Justice_effects_desc
        Threshold  2 

        Effect Unrest  1 
        Effect Law  2 

    Level Harsh_Justice
        Description Harsh_Justice_desc
        EffectsDescription Harsh_Justice_effects_desc
        Threshold  3 

        Effect Unrest  2 
        Effect Law  4 

    Level Severe_Justice
        Description Severe_Justice_desc
        EffectsDescription Severe_Justice_effects_desc
        Threshold  7 

        Effect Chivalry -1 
        Effect Unrest  3 
        Effect Law  6 

;------------------------------------------
Trait LenientJustice
    Characters family
    NoGoingBackLevel  3 
    AntiTraits HarshJustice, Just, Unjust

    Level Soft_Judge
        Description Soft_Judge_desc
        EffectsDescription Soft_Judge_effects_desc
        Threshold  2 

        Effect Chivalry  1 
        Effect Law -1 

    Level Merciful_Judge
        Description Merciful_Judge_desc
        EffectsDescription Merciful_Judge_effects_desc
        Threshold  3 

        Effect Chivalry  2 
        Effect Law -2 

    Level Kind_Judge
        Description Kind_Judge_desc
        EffectsDescription Kind_Judge_effects_desc
        Threshold  7 

        Effect Chivalry  1 
        Effect Law -3 

;------------------------------------------
Trait HarshRuler
    Characters family
    NoGoingBackLevel  1 
    AntiTraits KindRuler, NonAuthoritarian

    Level Iron_Fisted
        Description Iron_Fisted_desc
        EffectsDescription Iron_Fisted_effects_desc
        Threshold  1 

        Effect Chivalry -1 
        Effect Law  1 

    Level Harsh_Ruler
        Description Harsh_Ruler_desc
        EffectsDescription Harsh_Ruler_effects_desc
        Threshold  3 

        Effect Chivalry -2 
        Effect PersonalSecurity -1 
        Effect Squalor  1 
        Effect Law  2 

    Level Cruel_Ruler
        Description Cruel_Ruler_desc
        EffectsDescription Cruel_Ruler_effects_desc
        Epithet Cruel_Ruler_epithet_desc
        Threshold  6 

        Effect Chivalry -3 
        Effect PersonalSecurity -2 
        Effect Squalor  2 
        Effect Law  3 

;------------------------------------------
Trait KindRuler
    Characters family
    NoGoingBackLevel  3 
    AntiTraits HarshRuler, Authoritarian

    Level Reasonable_Ruler
        Description Reasonable_Ruler_desc
        EffectsDescription Reasonable_Ruler_effects_desc
        Threshold  1 

        Effect Chivalry  1 
        Effect Squalor -1 

    Level Kind_Ruler
        Description Kind_Ruler_desc
        EffectsDescription Kind_Ruler_effects_desc
        Threshold  3 

        Effect Chivalry  2 
        Effect Squalor -2 

    Level Benevolent_Ruler
        Description Benevolent_Ruler_desc
        EffectsDescription Benevolent_Ruler_effects_desc
        Epithet Benevolent_Ruler_epithet_desc
        Threshold  7 

        Effect Chivalry  3 
        Effect Squalor -3 

;------------------------------------------
Trait GoodBuilder
    Characters family
    NoGoingBackLevel  2 
    AntiTraits BadBuilder

    Level Active_Builder
        Description Active_Builder_desc
        EffectsDescription Active_Builder_effects_desc
        Threshold  6 

        Effect Construction  5 
        Effect Squalor -1 

    Level Urban_Planner
        Description Urban_Planner_desc
        EffectsDescription Urban_Planner_effects_desc
        Threshold  12 

        Effect Construction  10 
        Effect Squalor -2 

    Level Great_Builder
        Description Great_Builder_desc
        EffectsDescription Great_Builder_effects_desc
        Epithet Great_Builder_epithet_desc
        Threshold  24 

        Effect Construction  15 
        Effect Squalor -3 

;------------------------------------------
Trait BadBuilder
    Characters family
    NoGoingBackLevel  2 
    AntiTraits GoodBuilder

    Level Not_Constructive
        Description Not_Constructive_desc
        EffectsDescription Not_Constructive_effects_desc
        Threshold  2 

        Effect Construction -5 
        Effect Squalor  1 

    Level Sloppy_Builder
        Description Sloppy_Builder_desc
        EffectsDescription Sloppy_Builder_effects_desc
        Threshold  4 

        Effect Construction -10 
        Effect Squalor  2 

    Level Abhors_Construction
        Description Abhors_Construction_desc
        EffectsDescription Abhors_Construction_effects_desc
        Threshold  6 

        Effect Construction -15 
        Effect Squalor  3 

;------------------------------------------
Trait Generous
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Miserly

    Level Generous
        Description Generous_desc
        EffectsDescription Generous_effects_desc
        Threshold  3 

        Effect TaxCollection -2 

    Level Openly_Giving
        Description Openly_Giving_desc
        EffectsDescription Openly_Giving_effects_desc
        Threshold  4 

        Effect Trading -2 
        Effect TaxCollection -5 

    Level Overly_Generous
        Description Overly_Generous_desc
        EffectsDescription Overly_Generous_effects_desc
        Threshold  8 

        Effect Trading -5 
        Effect TaxCollection -10 

;------------------------------------------
Trait Miserly
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Generous

    Level Mean_with_Money
        Description Mean_with_Money_desc
        EffectsDescription Mean_with_Money_effects_desc
        Threshold  1 

        Effect TaxCollection  2 
        Effect Squalor  1 

    Level Hoarder_of_Wealth
        Description Hoarder_of_Wealth_desc
        EffectsDescription Hoarder_of_Wealth_effects_desc
        Threshold  2 

        Effect Trading  2 
        Effect TaxCollection  5 
        Effect Squalor  2 

    Level Miserly
        Description Miserly_desc
        EffectsDescription Miserly_effects_desc
        Epithet Miserly_epithet_desc
        Threshold  4 

        Effect Trading  5 
        Effect TaxCollection  10 
        Effect Squalor  3 

;------------------------------------------
Trait Noctophobia
    Characters family
    AntiTraits Noctophilia

    Level Spooked_at_Night
        Description Spooked_at_Night_desc
        EffectsDescription Spooked_at_Night_effects_desc
        Threshold  2 

        Effect NightBattle -1 

    Level Fear_of_the_Dark
        Description Fear_of_the_Dark_desc
        EffectsDescription Fear_of_the_Dark_effects_desc
        Threshold  3 

        Effect NightBattle -2 
        Effect PersonalSecurity  1 

    Level Noctophobic
        Description Noctophobic_desc
        EffectsDescription Noctophobic_effects_desc
        Threshold  5 

        Effect NightBattle -3 
        Effect PersonalSecurity  2 

;------------------------------------------
Trait Noctophilia
    Characters family
    AntiTraits Noctophobia

    Level Likes_the_Dark
        Description Likes_the_Dark_desc
        EffectsDescription Likes_the_Dark_effects_desc
        Threshold  2 

        Effect NightBattle  1 

    Level Effective_at_Night
        Description Effective_at_Night_desc
        EffectsDescription Effective_at_Night_effects_desc
        Threshold  3 

        Effect NightBattle  2 

    Level Nocturnal
        Description Nocturnal_desc
        EffectsDescription Nocturnal_effects_desc
        GainMessage Nocturnal_gain_desc
        Threshold  5 

        Effect NightBattle  3 

;------------------------------------------
Trait Perverted
    Characters family
    AntiTraits Prim

    Level Sexually_Liberated
        Description Sexually_Liberated_desc
        EffectsDescription Sexually_Liberated_effects_desc
        Threshold  2 

        Effect LocalPopularity  1 

    Level Sexually_Eccentric
        Description Sexually_Eccentric_desc
        EffectsDescription Sexually_Eccentric_effects_desc
        Threshold  4 

        Effect LocalPopularity -1 

    Level Sexually_Debauched
        Description Sexually_Debauched_desc
        EffectsDescription Sexually_Debauched_effects_desc
        Threshold  7 

        Effect Piety -1 
        Effect LocalPopularity -2 

    Level Sexually_Perverse
        Description Sexually_Perverse_desc
        EffectsDescription Sexually_Perverse_effects_desc
        Threshold  8 

        Effect Piety -2 
        Effect LocalPopularity -3 

    Level Sexually_Corrupt
        Description Sexually_Corrupt_desc
        EffectsDescription Sexually_Corrupt_effects_desc
        Threshold  9 

        Effect Piety -3 
        Effect Authority -1 
        Effect LocalPopularity -4 

    Level Diabolically_Degenerate
        Description Diabolically_Degenerate_desc
        EffectsDescription Diabolically_Degenerate_effects_desc
        Epithet Diabolically_Degenerate_epithet_desc
        Threshold  10 

        Effect Piety -4 
        Effect Authority -2 
        Effect LocalPopularity -5 

;------------------------------------------
Trait Scout
    Characters family

    Level Adopts_Scouting
        Description Adopts_Scouting_desc
        EffectsDescription Adopts_Scouting_effects_desc
        Threshold  2 

        Effect LineOfSight  1 

    Level Adept_Scout
        Description Adept_Scout_desc
        EffectsDescription Adept_Scout_effects_desc
        Threshold  4 

        Effect LineOfSight  2 

    Level Reconnaissance_Expert
        Description Reconnaissance_Expert_desc
        EffectsDescription Reconnaissance_Expert_effects_desc
        Threshold  6 

        Effect LineOfSight  3 

;------------------------------------------
Trait Inbred
    Characters family
    NoGoingBackLevel  1 

    Level A_Bit_Odd
        Description A_Bit_Odd_desc
        EffectsDescription A_Bit_Odd_effects_desc
        Threshold  1 

        Effect Fertility -1 

    Level Of_Dubious_Lineage
        Description Of_Dubious_Lineage_desc
        EffectsDescription Of_Dubious_Lineage_effects_desc
        Threshold  2 

        Effect Fertility -2 

    Level Inbred
        Description Inbred_desc
        EffectsDescription Inbred_effects_desc
        Threshold  3 

        Effect Command -1 
        Effect TaxCollection -2 
        Effect Fertility -3 

    Level Woefully_Inbred
        Description Woefully_Inbred_desc
        EffectsDescription Woefully_Inbred_effects_desc
        Threshold  4 

        Effect Command -1 
        Effect Authority -1 
        Effect TaxCollection -5 
        Effect Fertility -4 

    Level Spawn_of_Incest
        Description Spawn_of_Incest_desc
        EffectsDescription Spawn_of_Incest_effects_desc
        Threshold  5 

        Effect Command -2 
        Effect Authority -2 
        Effect TaxCollection -10 
        Effect Fertility -5 

    Level Betrothed_to_Mother
        Description Betrothed_to_Mother_desc
        EffectsDescription Betrothed_to_Mother_effects_desc
        Epithet Betrothed_to_Mother_epithet_desc
        Threshold  6 

        Effect Command -3 
        Effect Authority -3 
        Effect TaxCollection -15 

;------------------------------------------
Trait Handsome
    Characters family
    NoGoingBackLevel  1 
    AntiTraits Ugly

    Level Handsome
        Description Handsome_desc
        EffectsDescription Handsome_effects_desc
        Threshold  1 

        Effect LocalPopularity  1 

    Level Physically_Attractive
        Description Physically_Attractive_desc
        EffectsDescription Physically_Attractive_effects_desc
        Threshold  2 

        Effect LocalPopularity  2 

    Level Striking_to_Behold
        Description Striking_to_Behold_desc
        EffectsDescription Striking_to_Behold_effects_desc
        Threshold  3 

        Effect Authority  1 
        Effect LocalPopularity  3 

    Level Physically_Flawless
        Description Physically_Flawless_desc
        EffectsDescription Physically_Flawless_effects_desc
        Epithet Physically_Flawless_epithet_desc
        Threshold  4 

        Effect Command -1 
        Effect Authority  1 
        Effect LocalPopularity  4 

;------------------------------------------
Trait Ugly
    Characters family
    NoGoingBackLevel  1 
    AntiTraits Handsome

    Level Plain
        Description Plain_desc
        EffectsDescription Plain_effects_desc
        Threshold  1 

        Effect LocalPopularity -1 

    Level A_Bit_Rough
        Description A_Bit_Rough_desc
        EffectsDescription A_Bit_Rough_effects_desc
        Threshold  2 

        Effect Command  1 
        Effect LocalPopularity -2 

    Level Ugly
        Description Ugly_desc
        EffectsDescription Ugly_effects_desc
        Threshold  3 

        Effect Command  1 
        Effect LocalPopularity -3 
        Effect Fertility -1 

    Level Repulsive_to_Behold
        Description Repulsive_to_Behold_desc
        EffectsDescription Repulsive_to_Behold_effects_desc
        Threshold  4 

        Effect Command  1 
        Effect LocalPopularity -4 
        Effect Fertility -2 

    Level Cruelly_Deformed
        Description Cruelly_Deformed_desc
        EffectsDescription Cruelly_Deformed_effects_desc
        Epithet Cruelly_Deformed_epithet_desc
        Threshold  5 

        Effect Fertility -3 

;------------------------------------------
Trait Fertile
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Inbred, Infertile

    Level Virile
        Description Virile_desc
        EffectsDescription Virile_effects_desc
        Threshold  1 

        Effect Fertility  1 

    Level Fertile
        Description Fertile_desc
        EffectsDescription Fertile_effects_desc
        Threshold  2 

        Effect Fertility  2 

    Level Prolific
        Description Prolific_desc
        EffectsDescription Prolific_effects_desc
        Threshold  4 

        Effect Fertility  3 

;------------------------------------------
Trait Infertile
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Fertile

    Level Effete
        Description Effete_desc
        EffectsDescription Effete_effects_desc
        Threshold  1 

        Effect Fertility -1 

    Level Infertile
        Description Infertile_desc
        EffectsDescription Infertile_effects_desc
        Threshold  2 

        Effect Fertility -2 

    Level Lame_of_Loin
        Description Lame_of_Loin_desc
        EffectsDescription Lame_of_Loin_effects_desc
        Threshold  3 

        Effect Fertility -3 

;------------------------------------------
Trait GoodTaxman
    Characters family
    AntiTraits BadTaxman

    Level Good_with_Taxes
        Description Good_with_Taxes_desc
        EffectsDescription Good_with_Taxes_effects_desc
        Threshold  1 

        Effect TaxCollection  10 

    Level Thorough_Taxman
        Description Thorough_Taxman_desc
        EffectsDescription Thorough_Taxman_effects_desc
        Threshold  2 

        Effect TaxCollection  20 
        Effect Unrest  1 

    Level Cruelly_Exacting_Taxman
        Description Cruelly_Exacting_Taxman_desc
        EffectsDescription Cruelly_Exacting_Taxman_effects_desc
        Threshold  3 

        Effect TaxCollection  30 
        Effect Unrest  2 

;------------------------------------------
Trait BadTaxman
    Characters family
    AntiTraits GoodTaxman

    Level Poor_with_Taxes
        Description Poor_with_Taxes_desc
        EffectsDescription Poor_with_Taxes_effects_desc
        Threshold  1 

        Effect TaxCollection -5 

    Level Sloppy_Taxman
        Description Sloppy_Taxman_desc
        EffectsDescription Sloppy_Taxman_effects_desc
        Threshold  2 

        Effect TaxCollection -10 

    Level Tax_Farmer
        Description Tax_Farmer_desc
        EffectsDescription Tax_Farmer_effects_desc
        Threshold  3 

        Effect TaxCollection -15 

;------------------------------------------
Trait Divorced
    Characters family
    Hidden
    AntiTraits Cuckold

    Level Divorced
        Description Divorced_desc
        EffectsDescription Divorced_effects_desc
        Threshold  1

;------------------------------------------
Trait Superstitious
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Pragmatic

    Level Silly_Beliefs
        Description Silly_Beliefs_desc
        EffectsDescription Silly_Beliefs_effects_desc
        Threshold  1 

        Effect Piety -1 

    Level Superstitious
        Description Superstitious_desc
        EffectsDescription Superstitious_effects_desc
        Threshold  2 

        Effect Piety -1 
        Effect TroopMorale -1 

    Level Slave_to_Superstition
        Description Slave_to_Superstition_desc
        EffectsDescription Slave_to_Superstition_effects_desc
        Threshold  4 

        Effect Piety -2 
        Effect Authority -1 
        Effect TroopMorale -2 

;------------------------------------------
Trait Pragmatic
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Superstitious

    Level Mostly_Rational
        Description Mostly_Rational_desc
        EffectsDescription Mostly_Rational_effects_desc
        Threshold  1 

        Effect Authority  1 

    Level No_Nonsense
        Description No_Nonsense_desc
        EffectsDescription No_Nonsense_effects_desc
        Threshold  2 

        Effect Authority  2 
        Effect TroopMorale  1 

    Level Utterly_Pragmatic
        Description Utterly_Pragmatic_desc
        EffectsDescription Utterly_Pragmatic_effects_desc
        Threshold  3 

        Effect Authority  3 
        Effect TroopMorale  2 

;------------------------------------------
Trait ExpensiveTastes
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Cheapskate, Austere

    Level Extravagant
        Description Extravagant_desc
        EffectsDescription Extravagant_effects_desc
        Threshold  1 

        Effect Construction -5 
        Effect TaxCollection -10 

    Level Royally_Extravagant
        Description Royally_Extravagant_desc
        EffectsDescription Royally_Extravagant_effects_desc
        Threshold  2 

        Effect Construction -10 
        Effect TaxCollection -20 
        Effect Squalor -1 

    Level Wildly_Extravagant
        Description Wildly_Extravagant_desc
        EffectsDescription Wildly_Extravagant_effects_desc
        Threshold  3 

        Effect Construction -15 
        Effect TaxCollection -30 
        Effect Squalor -2 

;------------------------------------------
Trait Cheapskate
    Characters family
    NoGoingBackLevel  2 
    AntiTraits ExpensiveTastes, Aesthetic

    Level Cheap
        Description Cheap_desc
        EffectsDescription Cheap_effects_desc
        Threshold  1 

        Effect Construction  5 
        Effect TaxCollection  5 
        Effect Squalor  1 

    Level Tight
        Description Tight_desc
        EffectsDescription Tight_effects_desc
        Threshold  2 

        Effect Construction  10 
        Effect TaxCollection  10 
        Effect Squalor  2 

    Level Total_Cheapskate
        Description Total_Cheapskate_desc
        EffectsDescription Total_Cheapskate_effects_desc
        Threshold  3 

        Effect Construction  15 
        Effect TaxCollection  15 
        Effect Squalor  3 

;------------------------------------------
Trait Hypochondriac
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Sane

    Level Feeling_Poorly
        Description Feeling_Poorly_desc
        EffectsDescription Feeling_Poorly_effects_desc
        Threshold  1 

        Effect Attack -1 
        Effect HitPoints -2 

    Level Delusions_of_Illness
        Description Delusions_of_Illness_desc
        EffectsDescription Delusions_of_Illness_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect Attack -1 
        Effect HitPoints -4 

    Level Hypochondriac
        Description Hypochondriac_desc
        EffectsDescription Hypochondriac_effects_desc
        Threshold  3 

        Effect TroopMorale -2 
        Effect Attack -2 
        Effect HitPoints -6 

;------------------------------------------
Trait TouchedByTheGods
    Characters family
    NoGoingBackLevel  2 
    AntiTraits PublicAtheism

    Level Servant_of_Heaven
        Description Servant_of_Heaven_desc
        EffectsDescription Servant_of_Heaven_effects_desc
        Threshold  1 

        Effect Piety  2 

    Level Dramatic_Visions
        Description Dramatic_Visions_desc
        EffectsDescription Dramatic_Visions_effects_desc
        Threshold  2 

        Effect Piety  4 

    Level Vision_of_Prophecy
        Description Vision_of_Prophecy_desc
        EffectsDescription Vision_of_Prophecy_effects_desc
        Threshold  3 

        Effect Piety  6 

;------------------------------------------
Trait Sane
    Characters family
    Hidden
    AntiTraits Insane, Deranged

    Level Sane
        Description Sane_desc
        EffectsDescription Sane_effects_desc
        Threshold  1 

;------------------------------------------
Trait Insane
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Sane

    Level Dysfunctional
        Description Dysfunctional_desc
        EffectsDescription Dysfunctional_effects_desc
        Threshold  1 

        Effect Authority -1 
        Effect TroopMorale -1 

    Level Quite_Mad
        Description Quite_Mad_desc
        EffectsDescription Quite_Mad_effects_desc
        Threshold  2 

        Effect Authority -2 
        Effect TroopMorale -2 

    Level Utterly_Insane
        Description Utterly_Insane_desc
        EffectsDescription Utterly_Insane_effects_desc
        Epithet Utterly_Insane_epithet_desc
        Threshold  3 

        Effect Authority -4 
        Effect TroopMorale -3 

;------------------------------------------
Trait Deranged
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Sane

    Level Skewed_View
        Description Skewed_View_desc
        EffectsDescription Skewed_View_effects_desc
        Threshold  1 

        Effect Command -1 
        Effect Authority -1 
        Effect Trading -2 

    Level Deranged
        Description Deranged_desc
        EffectsDescription Deranged_effects_desc
        Threshold  2 

        Effect Command -2 
        Effect Authority -2 
        Effect TroopMorale -1 
        Effect Trading -5 
        Effect TaxCollection -2 

    Level Dangerously_Mad
        Description Dangerously_Mad_desc
        EffectsDescription Dangerously_Mad_effects_desc
        Epithet Dangerously_Mad_epithet_desc
        Threshold  3 

        Effect Command -3 
        Effect Authority -3 
        Effect TroopMorale -2 
        Effect Trading -10 
        Effect TaxCollection -5 

;------------------------------------------
Trait Bloodthirsty
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Sane, Haemophobic

    Level Fine_with_Blood
        Description Fine_with_Blood_desc
        EffectsDescription Fine_with_Blood_effects_desc
        Threshold  1 

        Effect Chivalry -1 
        Effect Command  1 
        Effect TroopMorale  1 

    Level Sanguinary
        Description Sanguinary_desc
        EffectsDescription Sanguinary_effects_desc
        Threshold  2 

        Effect Chivalry -2 
        Effect Command  1 
        Effect TroopMorale -1 

    Level Bloodthirsty
        Description Bloodthirsty_desc
        EffectsDescription Bloodthirsty_effects_desc
        Threshold  3 

        Effect Chivalry -3 
        Effect Command -1 
        Effect TroopMorale -3 

;------------------------------------------
Trait Haemophobic
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Bloodthirsty, Brave

    Level Un-Manly
        Description Un-Manly_desc
        EffectsDescription Un-Manly_effects_desc
        Threshold  1 

        Effect Authority -1 
        Effect TroopMorale -1 

    Level Disgusted_by_Blood
        Description Disgusted_by_Blood_desc
        EffectsDescription Disgusted_by_Blood_effects_desc
        Threshold  2 

        Effect Authority -2 
        Effect TroopMorale -2 

    Level Fears_Blood
        Description Fears_Blood_desc
        EffectsDescription Fears_Blood_effects_desc
        Threshold  3 

        Effect Authority -3 
        Effect TroopMorale -3 

;------------------------------------------
Trait Anger
    Characters family

    Level Easily_Riled
        Description Easily_Riled_desc
        EffectsDescription Easily_Riled_effects_desc
        Threshold  1 

        Effect Authority  1 

    Level Seethes_with_Anger
        Description Seethes_with_Anger_desc
        EffectsDescription Seethes_with_Anger_effects_desc
        Threshold  2 

        Effect Chivalry -1 
        Effect Command  1 
        Effect TroopMorale -1 

    Level Driven_by_Rage
        Description Driven_by_Rage_desc
        EffectsDescription Driven_by_Rage_effects_desc
        Epithet Driven_by_Rage_epithet_desc
        Threshold  3 

        Effect Chivalry -2 
        Effect Command  2 
        Effect TroopMorale -2 

;------------------------------------------
Trait Lewd
    Characters family
    NoGoingBackLevel  3 
    AntiTraits Prim

    Level Crude
        Description Crude_desc
        EffectsDescription Crude_effects_desc
        Threshold  1 

        Effect Authority -1 
        Effect BribeResistance -2 

    Level Lewd
        Description Lewd_desc
        EffectsDescription Lewd_effects_desc
        Threshold  2 

        Effect Authority -2 
        Effect BribeResistance -3 

    Level Shamelessly_Lewd
        Description Shamelessly_Lewd_desc
        EffectsDescription Shamelessly_Lewd_effects_desc
        Epithet Shamelessly_Lewd_epithet_desc
        Threshold  3 

        Effect Authority -3 
        Effect BribeResistance -5 

;------------------------------------------
Trait Prim
    Characters family
    NoGoingBackLevel  2 
    AntiTraits Lewd, Feck, Perverted

    Level Proper_Morals
        Description Proper_Morals_desc
        EffectsDescription Proper_Morals_effects_desc
        Threshold  2

        Effect Authority  1 
        Effect BribeResistance  2 
        Effect Unrest  1 
        Effect Law  1 

    Level Prim
        Description Prim_desc
        EffectsDescription Prim_effects_desc
        Threshold  4

        Effect Authority  2 
        Effect BribeResistance  3 
        Effect Unrest  2 
        Effect Law  2 

    Level Holier_than_Thou
        Description Holier_than_Thou_desc
        EffectsDescription Holier_than_Thou_effects_desc
        Threshold  6

        Effect Command -1 
        Effect Authority  2 
        Effect BribeResistance  4 
        Effect Squalor -1 
        Effect Unrest  3 
        Effect Law  3 

;------------------------------------------
Trait Objective
    Characters family
    Hidden
    AntiTraits Subjective

    Level Quite_Objective
        Description Quite_Objective_desc
        EffectsDescription Quite_Objective_effects_desc
        Threshold  1 

;------------------------------------------
Trait Subjective
    Characters family
    Hidden
    AntiTraits Objective

    Level Quite_Subjective
        Description Quite_Subjective_desc
        EffectsDescription Quite_Subjective_effects_desc
        Threshold  1 

;------------------------------------------
Trait Gregarious
    Characters family
    AntiTraits Introvert

    Level Sociable
        Description Sociable_desc
        EffectsDescription Sociable_effects_desc
        Threshold  1 

        Effect LocalPopularity  1 

    Level Gregarious
        Description Gregarious_desc
        EffectsDescription Gregarious_effects_desc
        Threshold  2 

        Effect TroopMorale  1 
        Effect LocalPopularity  2 

    Level Everyone's_Friend
        Description Everyone's_Friend_desc
        EffectsDescription Everyone's_Friend_effects_desc
        Threshold  3 

        Effect TroopMorale  2 
        Effect LocalPopularity  3 

;------------------------------------------
Trait Introvert
    Characters family
    AntiTraits Gregarious

    Level Aloof
        Description Aloof_desc
        EffectsDescription Aloof_effects_desc
        Threshold  1 

        Effect LocalPopularity -1 

    Level Introverted
        Description Introverted_desc
        EffectsDescription Introverted_effects_desc
        Threshold  2 

        Effect TroopMorale -1 
        Effect LocalPopularity -2 

    Level Totally_Closed
        Description Totally_Closed_desc
        EffectsDescription Totally_Closed_effects_desc
        Threshold  3 

        Effect TroopMorale -2 
        Effect LocalPopularity -3 

;------------------------------------------
Trait Senile
    Characters family

    Level Somewhat_Senile
        Description Somewhat_Senile_desc
        EffectsDescription Somewhat_Senile_effects_desc
        Threshold  1 

        Effect Command -2 
        Effect Authority -1 
	Effect TaxCollection  -5

    Level Senile
        Description Senile_desc
        EffectsDescription Senile_effects_desc
        Threshold  2 

        Effect Command -4 
        Effect Authority -2
        Effect TroopMorale -1 
	Effect Trading  -5 
        Effect TaxCollection  -10 

    Level Totally_Senile
        Description Totally_Senile_desc
        EffectsDescription Totally_Senile_effects_desc
        Threshold  3 

        Effect Command -6 
        Effect Authority -3
        Effect TroopMorale -3
	Effect Trading  -10 
        Effect TaxCollection  -15
	Effect Unrest 2  

;------------------------------------------
Trait ContentGeneral
    Characters family
    AntiTraits DiscontentGeneral

    Level Feels_Appreciated
        Description Feels_Appreciated_desc
        EffectsDescription Feels_Appreciated_effects_desc
        Threshold  1 

        Effect Loyalty  1 

    Level Feels_Respected
        Description Feels_Respected_desc
        EffectsDescription Feels_Respected_effects_desc
        Threshold  4 

        Effect Loyalty  3 

    Level Feels_Honoured
        Description Feels_Honoured_desc
        EffectsDescription Feels_Honoured_effects_desc
        Threshold  8 

        Effect Loyalty  5 

;------------------------------------------
Trait DiscontentGeneral
    Characters family
    AntiTraits ContentGeneral

    Level Feels_Unappreciated
        Description Feels_Unappreciated_desc
        EffectsDescription Feels_Unappreciated_effects_desc
        Threshold  1 

        Effect Loyalty -1 

    Level Feels_Disrespected
        Description Feels_Disrespected_desc
        EffectsDescription Feels_Disrespected_effects_desc
        Threshold  4 

        Effect Loyalty -3 

    Level Feels_Dishonoured
        Description Feels_Dishonoured_desc
        EffectsDescription Feels_Dishonoured_effects_desc
        Threshold  8 

        Effect Loyalty -5 

;------------------------------------------
Trait ReligiousActivity
    Characters family
    AntiTraits ReligiousInactivity

    Level Religious
        Description Religious_desc
        EffectsDescription Religious_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Dutifully_Religious
        Description Dutifully_Religious_desc
        EffectsDescription Dutifully_Religious_effects_desc
        Threshold  3 

        Effect Piety  2 

    Level Religiously_Active
        Description Religiously_Active_desc
        EffectsDescription Religiously_Active_effects_desc
        Threshold  6 

        Effect Chivalry  1 
        Effect Piety  3 

    Level Devoutly_Religious
        Description Devoutly_Religious_desc
        EffectsDescription Devoutly_Religious_effects_desc
        Threshold  12 

        Effect Chivalry  2 
        Effect Piety  4 

;------------------------------------------
Trait ReligiousInactivity
    Characters family
    AntiTraits ReligiousActivity

    Level Neglects_Religion
        Description Neglects_Religion_desc
        EffectsDescription Neglects_Religion_effects_desc
        Threshold  2 

        Effect Piety -1 

    Level Religiously_Ignorant
        Description Religiously_Ignorant_desc
        EffectsDescription Religiously_Ignorant_effects_desc
        Threshold  5 

        Effect Piety -2 

;------------------------------------------
Trait ForcedReligious
    Characters family

    Level Conforming
        Description Conforming_desc
        EffectsDescription Conforming_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Reverant
        Description Reverant_desc
        EffectsDescription Reverant_effects_desc
        Threshold  3 

        Effect Piety  2 

    Level Godfearing
        Description Godfearing_desc
        EffectsDescription Godfearing_effects_desc
        Epithet Godfearing_epithet_desc
        Threshold  6 

        Effect Piety  3 
        Effect TroopMorale -1 

 ;------------------------------------------
Trait CrusaderHistory
    Characters family

    Level Crusader
        Description Crusader_desc
        EffectsDescription Crusader_effects_desc
        Threshold  3 

        Effect Chivalry  1 
        Effect Piety  1 
        Effect Combat_V_Religion_islam  1 

    Level Great_Crusader
        Description Great_Crusader_desc
        EffectsDescription Great_Crusader_effects_desc
        Threshold  9 

        Effect Chivalry  2 
        Effect Piety  2 
        Effect Combat_V_Religion_islam  2 

    Level Grand_Crusader
        Description Grand_Crusader_desc
        EffectsDescription Grand_Crusader_effects_desc
        Epithet Grand_Crusader_epithet_desc
        Threshold  15 

        Effect Chivalry  3 
        Effect Piety  3 
        Effect Combat_V_Religion_islam  3 

;------------------------------------------
Trait JihadHistory
    Characters family

    Level Holy_Soldier
        Description Holy_Soldier_desc
        EffectsDescription Holy_Soldier_effects_desc
        Threshold  3 

        Effect Chivalry  1 
        Effect Piety  1 
        Effect Combat_V_Religion_catholic  1 

    Level Holy_Defender
        Description Holy_Defender_desc
        EffectsDescription Holy_Defender_effects_desc
        Threshold  9 

        Effect Chivalry  2 
        Effect Piety  2 
        Effect Combat_V_Religion_catholic  2 

    Level Holy_Warrior
        Description Holy_Warrior_desc
        EffectsDescription Holy_Warrior_effects_desc
        Epithet Holy_Warrior_epithet_desc
        Threshold  15 

        Effect Chivalry  3 
        Effect Piety  3 
        Effect Combat_V_Religion_catholic  3

;------------------------------------------
Trait AdoredByPope
    Characters family

    Level Respected_by_Pope
        Description Respected_by_Pope_desc
        EffectsDescription Respected_by_Pope_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Combat_V_Religion_islam  1 

    Level Adored_by_Pope
        Description Adored_by_Pope_desc
        EffectsDescription Adored_by_Pope_effects_desc
        Threshold  2 

        Effect Piety  2 
        Effect Combat_V_Religion_islam  2 

    Level Exhalted_by_Pope
        Description Exhalted_by_Pope_desc
        EffectsDescription Exhalted_by_Pope_effects_desc
        Epithet Exhalted_by_Pope_epithet_desc
        Threshold  3 

        Effect Piety  3 
        Effect Combat_V_Religion_islam  3 

;------------------------------------------
Trait PopesEnforcer
    Characters family

    Level Pope's_Enforcer
        Description Pope's_Enforcer_desc
        EffectsDescription Pope's_Enforcer_effects_desc
        Threshold  1 

        Effect Chivalry -1 
        Effect Combat_V_Religion_islam  1 

    Level Pope's_Executioner
        Description Pope's_Executioner_desc
        EffectsDescription Pope's_Executioner_effects_desc
        Epithet Pope's_Executioner_epithet_desc
        Threshold  3 

        Effect Chivalry -2 
        Effect Combat_V_Religion_islam  2 

;------------------------------------------
Trait FathersLegacy
    Characters family

    Level Proud_Legacy
        Description Proud_Legacy_desc
        EffectsDescription Proud_Legacy_effects_desc
        Threshold  1 

        Effect Authority  1 

    Level Strong_Legacy
        Description Strong_Legacy_desc
        EffectsDescription Strong_Legacy_effects_desc
        Threshold  2 

        Effect Authority  2 

    Level Mighty_Legacy
        Description Mighty_Legacy_desc
        EffectsDescription Mighty_Legacy_effects_desc
        Threshold  3 

        Effect Authority  3 

;------------------------------------------
Trait ChivalryLegacy
    Characters family

    Level Chivalrous_Father
        Description Chivalrous_Father_desc
        EffectsDescription Chivalrous_Father_effects_desc
        Threshold  1 

        Effect Chivalry  1 

    Level Legacy_of_Chivalry
        Description Legacy_of_Chivalry_desc
        EffectsDescription Legacy_of_Chivalry_effects_desc
        Threshold  2 

        Effect Chivalry  2 

;------------------------------------------
Trait DreadLegacy
    Characters family

    Level Dreaded_Father
        Description Dreaded_Father_desc
        EffectsDescription Dreaded_Father_effects_desc
        Threshold  1 

        Effect Chivalry -1 

    Level Legacy_of_Dread
        Description Legacy_of_Dread_desc
        EffectsDescription Legacy_of_Dread_effects_desc
        Threshold  2 

        Effect Chivalry -2 

;------------------------------------------
Trait StrategyDread
    Characters family
    AntiTraits StrategyChivalry

    Level Mean_Leader
        Description Mean_Leader_desc
        EffectsDescription Mean_Leader_effects_desc
        Threshold  1 

        Effect Chivalry -1 

    Level Cruel_Leader
        Description Cruel_Leader_desc
        EffectsDescription Cruel_Leader_effects_desc
        Threshold  2 

        Effect Chivalry -2 

    Level Merciless_Leader
        Description Merciless_Leader_desc
        EffectsDescription Merciless_Leader_effects_desc
        Epithet Merciless_Leader_epithet_desc
        Threshold  4 

        Effect Chivalry -3 
        Effect Authority  1 

    Level Malevolent_Leader
        Description Malevolent_Leader_desc
        EffectsDescription Malevolent_Leader_effects_desc
        Epithet Malevolent_Leader_epithet_desc
        Threshold  8 

        Effect Chivalry -4 
        Effect Authority  2 

    Level Tyranical_Leader
        Description Tyranical_Leader_desc
        EffectsDescription Tyranical_Leader_effects_desc
        Epithet Tyranical_Leader_epithet_desc
        Threshold  16 

        Effect Chivalry -5 
        Effect Authority  3 

;------------------------------------------
Trait StrategyChivalry
    Characters family
    AntiTraits StrategyDread

    Level Fair_in_Rule
        Description Fair_in_Rule_desc
        EffectsDescription Fair_in_Rule_effects_desc
        Threshold  1 

        Effect Chivalry  1 

    Level Noble_in_Rule
        Description Noble_in_Rule_desc
        EffectsDescription Noble_in_Rule_effects_desc
        Threshold  2 

        Effect Chivalry  2 

    Level Chivalrous_in_Rule
        Description Chivalrous_in_Rule_desc
        EffectsDescription Chivalrous_in_Rule_effects_desc
        Epithet Chivalrous_in_Rule_epithet_desc
        Threshold  4 

        Effect Chivalry  3 
        Effect Authority  1 

    Level Honourable_Ruler
        Description Honourable_Ruler_desc
        EffectsDescription Honourable_Ruler_effects_desc
        Epithet Honourable_Ruler_epithet_desc
        Threshold  8 

        Effect Chivalry  4 
        Effect Authority  2 

    Level Saintly_Ruler
        Description Saintly_Ruler_desc
        EffectsDescription Saintly_Ruler_effects_desc
        Epithet Saintly_Ruler_epithet_desc
        Threshold  16 

        Effect Chivalry  5 
        Effect Authority  3 

;------------------------------------------
Trait Cursed
    Characters family

    Level Hexxed
        Description Hexxed_desc
        EffectsDescription Hexxed_effects_desc
        Threshold  1 

        Effect Command -1 
        Effect TroopMorale -1 

    Level Cursed
        Description Cursed_desc
        EffectsDescription Cursed_effects_desc
        Threshold  2 

        Effect Command -2 
        Effect TroopMorale -2 

    Level Blighted
        Description Blighted_desc
        EffectsDescription Blighted_effects_desc
        Threshold  3 

        Effect Piety -1 
        Effect Command -3 
        Effect Authority -1 
        Effect TroopMorale -3 

    Level Damned
        Description Damned_desc
        EffectsDescription Damned_effects_desc
        Threshold  4 

        Effect Piety -3 
        Effect Command -4 
        Effect Authority -2 
        Effect TroopMorale -4 

;------------------------------------------
Trait StrickenSilly
    Characters family

    Level Warts
        Description Warts_desc
        EffectsDescription Warts_effects_desc
        Threshold  1 

        Effect Command -1 
        Effect TroopMorale -1 

    Level Flatulant
        Description Flatulant_desc
        EffectsDescription Flatulant_effects_desc
        Threshold  2 

        Effect Command -2 
        Effect Authority -1 
        Effect TroopMorale -2 

    Level Boil-ridden
        Description Boil-ridden_desc
        EffectsDescription Boil-ridden_effects_desc
        Threshold  3 

        Effect Piety 1 
        Effect Command -3 
        Effect Authority -2 
        Effect TroopMorale -3 

;------------------------------------------
Trait StrickenSerious
    Characters family

    Level Wracking_Cough
        Description Wracking_Cough_desc
        EffectsDescription Wracking_Cough_effects_desc
        Threshold  1 

    Effect Piety -1
        Effect Command -1 
        Effect TroopMorale -1 

    Level Evil_Illness
        Description Evil_Illness_desc
        EffectsDescription Evil_Illness_effects_desc
        Threshold  2 

        Effect Command -2 
        Effect TroopMorale -2 

    Level Stricken_Down
        Description Stricken_Down_desc
        EffectsDescription Stricken_Down_effects_desc
        Threshold  3 

        Effect Piety 1 
        Effect Command -3 
        Effect Authority -1 
        Effect TroopMorale -3 

;------------------------------------------
Trait TourneyKnight
    Characters family

    Level Tourney_Entrant
        Description Tourney_Entrant_desc
        EffectsDescription Tourney_Entrant_effects_desc
        Threshold  1 

        Effect Chivalry  1 

    Level Fair_Jouster
        Description Fair_Jouster_desc
        EffectsDescription Fair_Jouster_effects_desc
        Threshold  3 

        Effect Chivalry  1 
        Effect CavalryCommand  1 

    Level Good_Jouster
        Description Good_Jouster_desc
        EffectsDescription Good_Jouster_effects_desc
        Threshold  6 

        Effect Chivalry  2 
        Effect CavalryCommand  1 

    Level Knight_of_Renown
        Description Knight_of_Renown_desc
        EffectsDescription Knight_of_Renown_effects_desc
        Threshold  12 

        Effect Chivalry  2 
        Effect Authority  1 
        Effect CavalryCommand  2 

    Level Tourney_Champion
        Description Tourney_Champion_desc
        EffectsDescription Tourney_Champion_effects_desc
        Threshold  18 

        Effect Chivalry  3 
        Effect Authority  2 
        Effect CavalryCommand  2 

;------------------------------------------
Trait HorseRacer
    Characters family

    Level Good_Racer
        Description Good_Racer_desc
        EffectsDescription Good_Racer_effects_desc
        Threshold  1 

        Effect MovementPoints  1

    Level Great_Racer
        Description Great_Racer_desc
        EffectsDescription Great_Racer_effects_desc
        Threshold  2 

        Effect MovementPoints  1
        Effect CavalryCommand  1 

    Level Famous_Racer
        Description Famous_Racer_desc
        EffectsDescription Famous_Racer_effects_desc
        Threshold  3 

        Effect Authority  1 
        Effect MovementPoints  1
        Effect CavalryCommand  1 

;------------------------------------------
Trait EasternWarlord
    Characters family

    Level Eastern_Warlord
        Description Eastern_Warlord_desc
        EffectsDescription Eastern_Warlord_effects_desc
        Threshold  1 

        Effect Chivalry -1 
        Effect Command  2 

    Level Mighty_Warlord
        Description Mighty_Warlord_desc
        EffectsDescription Mighty_Warlord_effects_desc
        Threshold  2 

        Effect Chivalry -2 
        Effect Command  4 

    Level Khan's_Conqueror
        Description Khan's_Conqueror_desc
        EffectsDescription Khan's_Conqueror_effects_desc
        Threshold  3 

        Effect Chivalry -3 
        Effect Command  6 

;------------------------------------------
Trait JaguarWarlord
    Characters family

    Level Mighty_Eagle
        Description Mighty_Eagle_desc
        EffectsDescription Mighty_Eagle_effects_desc
        Threshold  1 

        Effect Chivalry -1 
        Effect Command  2 

    Level Mighty_Jaguar
        Description Mighty_Jaguar_desc
        EffectsDescription Mighty_Jaguar_effects_desc
        Threshold  2 

        Effect Chivalry -2 
        Effect Command  4 

    Level Grand_Jaguar
        Description Grand_Jaguar_desc
        EffectsDescription Grand_Jaguar_effects_desc
        Threshold  3 

        Effect Chivalry -3 
        Effect Command  6

;*********  ADMIRAL TRAITS  *********
;------------------------------------------
Trait Sailor
    Characters admiral
    NoGoingBackLevel  2 
    AntiTraits Landlubber

    Level Competent_Sailor
        Description Competent_Sailor_desc
        EffectsDescription Competent_Sailor_effects_desc
        GainMessage Competent_Sailor_gain_desc
        Threshold  1 

        Effect NavalCommand  1 

    Level Fine_Officer
        Description Fine_Officer_desc
        EffectsDescription Fine_Officer_effects_desc
        GainMessage Fine_Officer_gain_desc
        Threshold  2 

        Effect NavalCommand  2 

    Level Worthy_Admiral
        Description Worthy_Admiral_desc
        EffectsDescription Worthy_Admiral_effects_desc
        GainMessage Worthy_Admiral_gain_desc
        Threshold  4 

        Effect NavalCommand  3 

    Level Great_Admiral
        Description Great_Admiral_desc
        EffectsDescription Great_Admiral_effects_desc
        GainMessage Great_Admiral_gain_desc
        Threshold  8 

        Effect NavalCommand  4 

    Level Legendary_Admiral
        Description Legendary_Admiral_desc
        EffectsDescription Legendary_Admiral_effects_desc
        GainMessage Legendary_Admiral_gain_desc
        Epithet Legendary_Admiral_epithet_desc
        Threshold  16 

        Effect NavalCommand  5 

;------------------------------------------
Trait Landlubber
    Characters admiral
    AntiTraits Sailor

    Level Poor_Navigator
        Description Poor_Navigator_desc
        EffectsDescription Poor_Navigator_effects_desc
        Threshold  1 

        Effect NavalCommand -1 

    Level No_Naval_Nouse
        Description No_Naval_Nouse_desc
        EffectsDescription No_Naval_Nouse_effects_desc
        Threshold  4 

        Effect NavalCommand -2 

    Level Total_Landlubber
        Description Total_Landlubber_desc
        EffectsDescription Total_Landlubber_effects_desc
        Threshold  5 

        Effect NavalCommand -3 

;------------------------------------------
Trait FamousPirate
    Characters admiral

    Level Dangerous_Captain
        Description Dangerous_Captain_desc
        EffectsDescription Dangerous_Captain_effects_desc
        Threshold  1 

        Effect Loyalty -1 
        Effect NavalCommand  1 

    Level Famous_Pirate
        Description Famous_Pirate_desc
        EffectsDescription Famous_Pirate_effects_desc
        Threshold  2 

        Effect Loyalty -2 
        Effect NavalCommand  2 

    Level Notorious_Pirate
        Description Notorious_Pirate_desc
        EffectsDescription Notorious_Pirate_effects_desc
        Threshold  3 

        Effect Loyalty -3 
        Effect NavalCommand  3

;*********  PRIEST TRAITS  *********
;------------------------------------------
Trait NaturalPriestSkill
    Characters priest

    Level Blessed
        Description Blessed_desc
        EffectsDescription Blessed_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Divine_Connection
        Description Divine_Connection_desc
        EffectsDescription Divine_Connection_effects_desc
        Threshold  2 

        Effect Piety  2 

    Level Chosen_One
        Description Chosen_One_desc
        EffectsDescription Chosen_One_effects_desc
        Threshold  3 

        Effect Piety  3

;------------------------------------------
Trait PriestLevel
    Characters priest

    Level Bishop
        Description Bishop_desc
        EffectsDescription Bishop_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Level  1 

    Level Cardinal
        Description Cardinal_desc
        EffectsDescription Cardinal_effects_desc
        Threshold  2 

        Effect Piety  1 
        Effect Level  2 
        Effect HeresyImmunity  1 

;------------------------------------------
Trait PatriachLevel
    Characters priest

    Level Patriach
        Description Patriach_desc
        EffectsDescription Patriach_effects_desc
        Epithet Patriach_epithet_desc
        Threshold  1 

        Effect HeresyImmunity  1

;------------------------------------------
Trait Bishop
    Characters priest
    Hidden

    Level A_Bishop
        Description A_Bishop_desc
        EffectsDescription A_Bishop_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Level  1 

;------------------------------------------
Trait Cardinal
    Characters priest
    Hidden

    Level PriestToCardinal
        Description PriestToCardinal_desc
        EffectsDescription PriestToCardinal_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Level  2 
        Effect HeresyImmunity  1 

    Level BishopToCardinal
        Description BishopToCardinal_desc
        EffectsDescription BishopToCardinal_effects_desc
        Threshold  2 

        Effect Piety  1 
        Effect Level  1 
        Effect HeresyImmunity  1

;------------------------------------------
Trait IAmPope
    Characters family
    Hidden

    Level Character_Is_Pope
        Description Character_Is_Pope_desc
        EffectsDescription Character_Is_Pope_effects_desc
        Threshold  1 

        Effect Level  1

;------------------------------------------
Trait GoodDenouncer
    Characters inquisitor, priest, heretic
    AntiTraits BadDenouncer

    Level Servant_of_God
        Description Servant_of_God_desc
        EffectsDescription Servant_of_God_effects_desc
        GainMessage Servant_of_God_gain_desc
        Threshold  1 

        Effect Piety  1 

    Level Enemy_of_Heretics
        Description Enemy_of_Heretics_desc
        EffectsDescription Enemy_of_Heretics_effects_desc
        GainMessage Enemy_of_Heretics_gain_desc
        Threshold  2 

        Effect Piety  2 

    Level Purger_of_Heretics
        Description Purger_of_Heretics_desc
        EffectsDescription Purger_of_Heretics_effects_desc
        GainMessage Purger_of_Heretics_gain_desc
        Threshold  4 

        Effect Piety  3 

    Level Conqueror_of_Heretics
        Description Conqueror_of_Heretics_desc
        EffectsDescription Conqueror_of_Heretics_effects_desc
        GainMessage Conqueror_of_Heretics_gain_desc
        Threshold  8 

        Effect Piety  4 

    Level Grand_Inquisitor
        Description Grand_Inquisitor_desc
        EffectsDescription Grand_Inquisitor_effects_desc
        GainMessage Grand_Inquisitor_gain_desc
        Epithet Grand_Inquisitor_epithet_desc
        Threshold  12 

        Effect Piety  5 

;------------------------------------------
Trait BadDenouncer
    Characters inquisitor, priest, heretic
    AntiTraits GoodDenouncer

    Level Poor_Prosecutor
        Description Poor_Prosecutor_desc
        EffectsDescription Poor_Prosecutor_effects_desc
        Threshold  1 

        Effect Piety -1 

    Level Dubious_Denouncer
        Description Dubious_Denouncer_desc
        EffectsDescription Dubious_Denouncer_effects_desc
        Threshold  3 

        Effect Piety -2 

    Level Pathetic_Prosecutor
        Description Pathetic_Prosecutor_desc
        EffectsDescription Pathetic_Prosecutor_effects_desc
        Threshold  6 

        Effect Piety -3


;------------------------------------------
Trait Warmonger
    Characters priest
    AntiTraits Peaceful

    Level Aggressive
        Description Aggressive_desc
        EffectsDescription Aggressive_effects_desc
        Threshold  1 

        Effect Violence  1 

    Level Warlike
        Description Warlike_desc
        EffectsDescription Warlike_effects_desc
        Threshold  2 

        Effect Violence  2 

    Level Violent
        Description Violent_desc
        EffectsDescription Violent_effects_desc
        Epithet Violent_epithet_desc
        Threshold  3 

        Effect Violence  3 

;------------------------------------------
Trait Peaceful
    Characters priest
    AntiTraits Warmonger

    Level Placid
        Description Placid_desc
        EffectsDescription Placid_effects_desc
        Threshold  1 

        Effect Violence -1 

    Level Peaceful
        Description Peaceful_desc
        EffectsDescription Peaceful_effects_desc
        Threshold  2 

        Effect Violence -2 

    Level Abhors_Violence
        Description Abhors_Violence_desc
        EffectsDescription Abhors_Violence_effects_desc
        Epithet Abhors_Violence_epithet_desc
        Threshold  3 

        Effect Violence -3 

;------------------------------------------
Trait Corrupted
    Characters priest
    AntiTraits Righteous

    Level Questionable
        Description Questionable_desc
        EffectsDescription Questionable_effects_desc
        Threshold  1 

        Effect Purity -1 

    Level Very_Questionable
        Description Very_Questionable_desc
        EffectsDescription Very_Questionable_effects_desc
        Threshold  2 

        Effect Purity -2 

    Level Utterly_Corrupt
        Description Utterly_Corrupt_desc
        EffectsDescription Utterly_Corrupt_effects_desc
        Epithet Utterly_Corrupt_epithet_desc
        Threshold  3 

        Effect Purity -3 

;------------------------------------------
Trait Righteous
    Characters priest
    AntiTraits Corrupt

    Level Upstanding
        Description Upstanding_desc
        EffectsDescription Upstanding_effects_desc
        Threshold  1 

        Effect Purity  1 

    Level Righteous
        Description Righteous_desc
        EffectsDescription Righteous_effects_desc
        Threshold  2 

        Effect Purity  2 

    Level Immaculately_Pure
        Description Immaculately_Pure_desc
        EffectsDescription Immaculately_Pure_effects_desc
        Epithet Immaculately_Pure_epithet_desc
        Threshold  3 

        Effect Purity  3 

;------------------------------------------
Trait SecretlyFemale
    Characters priest

    Level Secretly_Female
        Description Secretly_Female_desc
        EffectsDescription Secretly_Female_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Eligibility -1 
        Effect Purity  1 
        Effect Violence -1 

;------------------------------------------
Trait StrongFaith
    Characters priest, heretic
    AntiTraits WaveringFaith

    Level Growing_Faith
        Description Growing_Faith_desc
        EffectsDescription Growing_Faith_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Strong_Faith
        Description Strong_Faith_desc
        EffectsDescription Strong_Faith_effects_desc
        Threshold  4 

        Effect Piety  2 

    Level Shining_Faith
        Description Shining_Faith_desc
        EffectsDescription Shining_Faith_effects_desc
        Threshold  8 

        Effect Piety  3 

    Level Unquestionable_Faith
        Description Unquestionable_Faith_desc
        EffectsDescription Unquestionable_Faith_effects_desc
        Threshold  12 

        Effect Piety  4 

;------------------------------------------
Trait WaveringFaith
    Characters priest
    AntiTraits StrongFaith

    Level Waning_Faith
        Description Waning_Faith_desc
        EffectsDescription Waning_Faith_effects_desc
        Threshold  1 

        Effect Piety -1 

    Level Wavering_Faith
        Description Wavering_Faith_desc
        EffectsDescription Wavering_Faith_effects_desc
        Threshold  2 

        Effect Piety -2 

    Level Damaged_Faith
        Description Damaged_Faith_desc
        EffectsDescription Damaged_Faith_effects_desc
        Threshold  3 

        Effect Piety -3 

    Level Lost_Faith
        Description Lost_Faith_desc
        EffectsDescription Lost_Faith_effects_desc
        Threshold  4 

        Effect Piety -4 

;------------------------------------------
Trait Dogmatic
    Characters priest
    AntiTraits OpenMinded

    Level Orthodox_
        Description Orthodox__desc
        EffectsDescription Orthodox__effects_desc
        Threshold  1 

        Effect Unorthodoxy -1 

    Level Dogmatic
        Description Dogmatic_desc
        EffectsDescription Dogmatic_effects_desc
        Threshold  3 

        Effect Unorthodoxy -2 
        Effect Piety 1

    Level Utterly_Dogmatic
        Description Utterly_Dogmatic_desc
        EffectsDescription Utterly_Dogmatic_effects_desc
        Threshold  6 

        Effect Unorthodoxy -3
        Effect Piety 1
        Effect HeresyImmunity  1

;------------------------------------------
Trait OpenMinded
    Characters priest
    AntiTraits Dogmatic, PriestCatholicDoctrine, PriestOrthodoxDoctrine, PriestIslamicDoctrine

    Level Odd_Habits
        Description Odd_Habits_desc
        EffectsDescription Odd_Habits_effects_desc
        Threshold  1 

        Effect Unorthodoxy  1 

    Level Open-Minded
        Description Open-Minded_desc
        EffectsDescription Open-Minded_effects_desc
        Threshold  2 

        Effect Unorthodoxy  2 

    Level Quite_Unorthodox
        Description Quite_Unorthodox_desc
        EffectsDescription Quite_Unorthodox_effects_desc
        Epithet Quite_Unorthodox_epithet_desc
        Threshold  3 

        Effect Unorthodoxy  3 

;------------------------------------------
Trait DivineProtection
    Characters priest
    AntiTraits Doomsayer

    Level Blessedly_Lucky
        Description Blessedly_Lucky_desc
        EffectsDescription Blessedly_Lucky_effects_desc
        Threshold  1 

        Effect Violence  1 

    Level Divine_Protection
        Description Divine_Protection_desc
        EffectsDescription Divine_Protection_effects_desc
        Threshold  3 

        Effect Piety  1 
        Effect Violence  1 

    Level The_Chosen_One
        Description The_Chosen_One_desc
        EffectsDescription The_Chosen_One_effects_desc
        Epithet The_Chosen_One_epithet_desc
        Threshold  6 

        Effect Piety  2 
        Effect Violence  2 

;------------------------------------------
Trait Doomsayer
    Characters priest
    AntiTraits DivineProtection, DivineProtectionPagan

    Level Morbid
        Description Morbid_desc
        EffectsDescription Morbid_effects_desc
        Threshold  1 

        Effect Unorthodoxy  1 
        Effect Violence -1 

    Level Forsaken
        Description Forsaken_desc
        EffectsDescription Forsaken_effects_desc
        Threshold  3 

        Effect Unorthodoxy  1 
        Effect Violence -1 

    Level Doomsayer
        Description Doomsayer_desc
        EffectsDescription Doomsayer_effects_desc
        Epithet Doomsayer_epithet_desc
        Threshold  6 

        Effect Unorthodoxy  2 
        Effect Violence -2 

;------------------------------------------
Trait Purifier
    Characters priest

    Level Battler_of_Heresy
        Description Battler_of_Heresy_desc
        EffectsDescription Battler_of_Heresy_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Eligibility  1 
        Effect Purity  1 
        Effect Violence  1 

    Level Enemy_of_Heresy
        Description Enemy_of_Heresy_desc
        EffectsDescription Enemy_of_Heresy_effects_desc
        Threshold  3 

        Effect Piety  2 
        Effect Eligibility  1 
        Effect Purity  2 
        Effect Violence  2 

    Level Purger_of_Heresy
        Description Purger_of_Heresy_desc
        EffectsDescription Purger_of_Heresy_effects_desc
        Threshold  6 

        Effect Piety  3 
        Effect Eligibility  2 
        Effect Purity  3 
        Effect Violence  2 

;------------------------------------------
Trait Missionary
    Characters priest

    Level Missionary
        Description Missionary_desc
        EffectsDescription Missionary_effects_desc
        Threshold  1 

        Effect Piety  1 
        Effect Eligibility  1 
        Effect Purity  1 
        Effect Violence -1 

    Level Spreader_of_Faith
        Description Spreader_of_Faith_desc
        EffectsDescription Spreader_of_Faith_effects_desc
        Threshold  3 

        Effect Piety  2 
        Effect Eligibility  1 
        Effect Purity  2 
        Effect Violence -2 

    Level Beacon_of_Faith
        Description Beacon_of_Faith_desc
        EffectsDescription Beacon_of_Faith_effects_desc
        Threshold  6 

        Effect Piety  3 
        Effect Eligibility  2 
        Effect Purity  3 
        Effect Violence -2 

;------------------------------------------
Trait GrowingConviction
    Characters heretic, inquisitor
    AntiTraits WaningConviction

    Level Growing_Conviction
        Description Growing_Conviction_desc
        EffectsDescription Growing_Conviction_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Strengthened_Resolve
        Description Strengthened_Resolve_desc
        EffectsDescription Strengthened_Resolve_effects_desc
        Threshold  2 

        Effect Piety  2 

    Level Feeling_Invulnerable
        Description Feeling_Invulnerable_desc
        EffectsDescription Feeling_Invulnerable_effects_desc
        Threshold  4 

        Effect Piety  3 

;------------------------------------------
Trait WaningConviction
    Characters heretic, inquisitor
    AntiTraits GrowingConviction

    Level Waning_Conviction
        Description Waning_Conviction_desc
        EffectsDescription Waning_Conviction_effects_desc
        Threshold  1 

        Effect Piety -1 

    Level Questioning_Cause
        Description Questioning_Cause_desc
        EffectsDescription Questioning_Cause_effects_desc
        Threshold  2 

        Effect Piety -2 

    Level Feeling_Vulnerable
        Description Feeling_Vulnerable_desc
        EffectsDescription Feeling_Vulnerable_effects_desc
        Threshold  4 

        Effect Piety -3 

;------------------------------------------
Trait TheologiansGuildMember
    Characters priest

    Level Theologians'_Guild_Apprentice
        Description Theologians'_Guild_Apprentice_desc
        EffectsDescription Theologians'_Guild_Apprentice_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Theologians'_Guild_Journeyman
        Description Theologians'_Guild_Journeyman_desc
        EffectsDescription Theologians'_Guild_Journeyman_effects_desc
        Threshold  2 

        Effect Piety  2 

;------------------------------------------
Trait TheologiansGuildTrained
    Characters priest

    Level Orthodox_Instruction
        Description Orthodox_Instruction_desc
        EffectsDescription Orthodox_Instruction_effects_desc
        Threshold  1 

        Effect Piety  1 

;------------------------------------------
Trait HeresyImmunityNonCatholic
    Characters priest
    Hidden

    Level HeresyImmunityNC
        Description HeresyImmunityNC_desc
        EffectsDescription HeresyImmunityNC_effects_desc
        Threshold  1 

        Effect HeresyImmunity  1

;------------------------------------------
Trait UnorthodoxyBonus
    Characters priest
    Hidden

    Level UnorthodoxyBonusAI
        Description UnorthodoxyBonusAI_desc
        EffectsDescription UnorthodoxyBonusAI_effects_desc
        Threshold  1 

        Effect Unorthodoxy -1

;*********  INQUISITOR TRAITS  *********
;------------------------------------------
Trait NaturalInquisitorSkill
    Characters inquisitor

    Level Intuitive_Inquisitor
        Description Intuitive_Inquisitor_desc
        EffectsDescription Intuitive_Inquisitor_effects_desc
        Threshold  1 

        Effect Piety  2 

    Level Hunter_of_Heretics
        Description Hunter_of_Heretics_desc
        EffectsDescription Hunter_of_Heretics_effects_desc
        Threshold  2 

        Effect Piety  4 

    Level Born_Inquisitor
        Description Born_Inquisitor_desc
        EffectsDescription Born_Inquisitor_effects_desc
        Threshold  3 

        Effect Piety  6 

;------------------------------------------
Trait FairProsecutor
    Characters inquisitor
    AntiTraits UnfairProsecutor

    Level Somewhat_Fair
        Description Somewhat_Fair_desc
        EffectsDescription Somewhat_Fair_effects_desc
        Threshold  1 

        Effect Piety -1 

    Level Fair_and_Just
        Description Fair_and_Just_desc
        EffectsDescription Fair_and_Just_effects_desc
        Threshold  2 

        Effect Piety -2

;------------------------------------------
Trait UnfairProsecutor
    Characters inquisitor
    AntiTraits FairProsecutor

    Level Somewhat_Unjust
        Description Somewhat_Unjust_desc
        EffectsDescription Somewhat_Unjust_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level Unfair_and_Unjust
        Description Unfair_and_Unjust_desc
        EffectsDescription Unfair_and_Unjust_effects_desc
        Threshold  2 

        Effect Piety  2 

;------------------------------------------
Trait InquisitorFailure
    Characters inquisitor
    Hidden

    Level StrikeThree
        Description StrikeThree_desc
        EffectsDescription StrikeThree_effects_desc
        Threshold  5 

        Effect Piety -10 

;*********  MERCHANTILE TRAITS  *********
;------------------------------------------
Trait NaturalMerchantSkill
    Characters merchant

    Level Good_with_Money
        Description Good_with_Money_desc
        EffectsDescription Good_with_Money_effects_desc
        Threshold  1 

        Effect Finance  1 

    Level Natural_Born_Merchant
        Description Natural_Born_Merchant_desc
        EffectsDescription Natural_Born_Merchant_effects_desc
        Threshold  2 

        Effect Finance  2 

    Level Mercantile_Genius
        Description Mercantile_Genius_desc
        EffectsDescription Mercantile_Genius_effects_desc
        Threshold  3 

        Effect Finance  3

;------------------------------------------
Trait GoodMerchant
    Characters merchant
    AntiTraits BadMerchant

    Level Bean_Counter
        Description Bean_Counter_desc
        EffectsDescription Bean_Counter_effects_desc
        GainMessage Bean_Counter_gain_desc
        Threshold  1 

        Effect Finance  1 

    Level Bold_Barterer
        Description Bold_Barterer_desc
        EffectsDescription Bold_Barterer_effects_desc
        GainMessage Bold_Barterer_gain_desc
        Threshold  2 

        Effect Finance  2 

    Level Commercial_Conqueror
        Description Commercial_Conqueror_desc
        EffectsDescription Commercial_Conqueror_effects_desc
        GainMessage Commercial_Conqueror_gain_desc
        Threshold  4 

        Effect Finance  3 

    Level Robber_Baron
        Description Robber_Baron_desc
        EffectsDescription Robber_Baron_effects_desc
        GainMessage Robber_Baron_gain_desc
        Threshold  8 

        Effect Finance  4 

;------------------------------------------
Trait BadMerchant
    Characters merchant
    AntiTraits GoodMerchant

    Level Daft_Dealer
        Description Daft_Dealer_desc
        EffectsDescription Daft_Dealer_effects_desc
        Threshold  1 

        Effect Finance -1 

    Level Easy_Target
        Description Easy_Target_desc
        EffectsDescription Easy_Target_effects_desc
        Threshold  3 

        Effect Finance -2 

    Level Open_Purse
        Description Open_Purse_desc
        EffectsDescription Open_Purse_effects_desc
        Threshold  6 

        Effect Finance -3 

;------------------------------------------
Trait ExoticTastes
    Characters merchant

    Level Slight_Indulgence
        Description Slight_Indulgence_desc
        EffectsDescription Slight_Indulgence_effects_desc
        Threshold  1 

        Effect Finance -1 

    Level Decadent
        Description Decadent_desc
        EffectsDescription Decadent_effects_desc
        Threshold  3 

        Effect Finance -2 

    Level Gaudy
        Description Gaudy_desc
        EffectsDescription Gaudy_effects_desc
        Threshold  6 

        Effect Finance -2 
        Effect PersonalSecurity -1 

;------------------------------------------
Trait Monopolist
    Characters merchant

    Level Capitalist
        Description Capitalist_desc
        EffectsDescription Capitalist_effects_desc
        Threshold  3

        Effect Finance  1 

    Level Market_Controller
        Description Market_Controller_desc
        EffectsDescription Market_Controller_effects_desc
        Threshold  6

        Effect Finance  2 

    Level Monopolist
        Description Monopolist_desc
        EffectsDescription Monopolist_effects_desc
        Threshold  12

        Effect Finance  3 
        Effect PersonalSecurity -1 

;------------------------------------------
Trait MerchantEnemies
    Characters merchant

    Level A_Few_Enemies
        Description A_Few_Enemies_desc
        EffectsDescription A_Few_Enemies_effects_desc
        Threshold  1 

        Effect PersonalSecurity -1 

    Level Several_Enemies
        Description Several_Enemies_desc
        EffectsDescription Several_Enemies_effects_desc
        Threshold  3 

        Effect PersonalSecurity -2 

    Level A_Marked_Man
        Description A_Marked_Man_desc
        EffectsDescription A_Marked_Man_effects_desc
        Threshold  6 

        Effect PersonalSecurity -4 

;------------------------------------------
Trait ShadyDealer
    Characters merchant
    AntiTraits ReligiousMerchant, LegalDealer

    Level Slightly_Crooked
        Description Slightly_Crooked_desc
        EffectsDescription Slightly_Crooked_effects_desc
        Threshold  1 

        Effect Finance -1 

    Level Shady_Dealer
        Description Shady_Dealer_desc
        EffectsDescription Shady_Dealer_effects_desc
        Threshold  3 

        Effect Finance -2 

;------------------------------------------
Trait LegalDealer
    Characters merchant
    AntiTraits ShadyDealer

    Level Legal_Nouse
        Description Legal_Nouse_desc
        EffectsDescription Legal_Nouse_effects_desc
        Threshold  1 

        Effect Finance  1 

    Level Legal_Expert
        Description Legal_Expert_desc
        EffectsDescription Legal_Expert_effects_desc
        Threshold  3 

        Effect Finance  2 

;------------------------------------------
Trait SecureMerchant
    Characters merchant

    Level Secure_Assets
        Description Secure_Assets_desc
        EffectsDescription Secure_Assets_effects_desc
        Threshold  1 

        Effect Finance  1 

    Level Protected_Assets
        Description Protected_Assets_desc
        EffectsDescription Protected_Assets_effects_desc
        Threshold  3 

        Effect Finance  2 

;------------------------------------------
Trait SecurityMerchant
    Characters merchant

    Level Hires_Guards
        Description Hires_Guards_desc
        EffectsDescription Hires_Guards_effects_desc
        Threshold  1 

        Effect PersonalSecurity  1 

    Level Employs_Security
        Description Employs_Security_desc
        EffectsDescription Employs_Security_effects_desc
        Threshold  3 

        Effect Finance -1 
        Effect PersonalSecurity  2 

;------------------------------------------
Trait ServesSelfMerchant
    Characters merchant

    Level Loyal_to_Coin
        Description Loyal_to_Coin_desc
        EffectsDescription Loyal_to_Coin_effects_desc
        Threshold  1 

        Effect Finance -1 

    Level Self_Serving
        Description Self_Serving_desc
        EffectsDescription Self_Serving_effects_desc
        Threshold  3 

        Effect Finance -2 

;------------------------------------------
Trait ReligiousMerchant
    Characters merchant
    AntiTraits ShadyDealer

    Level Quite_Religious
        Description Quite_Religious_desc
        EffectsDescription Quite_Religious_effects_desc
        Threshold  1 

        Effect Finance -1 

    Level Dogmatically_Religious
        Description Dogmatically_Religious_desc
        EffectsDescription Dogmatically_Religious_effects_desc
        Threshold  4 

        Effect Finance -2 


;------------------------------------------
Trait WorldlyMerchant
    Characters merchant

    Level Knowledge_of_Customs
        Description Knowledge_of_Customs_desc
        EffectsDescription Knowledge_of_Customs_effects_desc
        Threshold  1 

        Effect Finance  1
        Effect MovementPoints  2 

    Level Graceful_Traveller
        Description Graceful_Traveller_desc
        EffectsDescription Graceful_Traveller_effects_desc
        Threshold  3 

        Effect Finance  2 
        Effect MovementPoints  5 

;------------------------------------------
Trait MerchantsGuildMember
    Characters merchant

    Level Merchants_Guild_Apprentice
        Description Merchants_Guild_Apprentice_desc
        EffectsDescription Merchants_Guild_Apprentice_effects_desc
        Threshold  1 

        Effect Finance  1
        Effect MovementPoints  2 

    Level Merchants_Guild_Journeyman
        Description Merchants_Guild_Journeyman_desc
        EffectsDescription Merchants_Guild_Journeyman_effects_desc
        Threshold  2 

        Effect Finance  2
        Effect MovementPoints  3 

    Level Merchants_Guild_Master
        Description Merchants_Guild_Master_desc
        EffectsDescription Merchants_Guild_Master_effects_desc
        Threshold  3 

        Effect Finance  3
        Effect MovementPoints  4 


;*********  DIPLOMAT TRAITS  *********
;------------------------------------------
Trait NaturalDiplomatSkill
    Characters diplomat

    Level Diplomatic_Nature
        Description Diplomatic_Nature_desc
        EffectsDescription Diplomatic_Nature_effects_desc
        Threshold  1 

        Effect Influence  1 

    Level Natural_Mediator
        Description Natural_Mediator_desc
        EffectsDescription Natural_Mediator_effects_desc
        Threshold  2 

        Effect Influence  2 
	Effect LineOfSight 1 

    Level Diplomatic_Genius
        Description Diplomatic_Genius_desc
        EffectsDescription Diplomatic_Genius_effects_desc
        Threshold  3 

        Effect Influence  3
	Effect LineOfSight 1 

;------------------------------------------
Trait GoodDiplomat
    Characters diplomat
    AntiTraits BadDiplomat

    Level Promising_Diplomat
        Description Promising_Diplomat_desc
        EffectsDescription Promising_Diplomat_effects_desc
        Threshold  1 

        Effect Influence  1 

    Level Good_Diplomat
        Description Good_Diplomat_desc
        EffectsDescription Good_Diplomat_effects_desc
        Threshold  2 

        Effect Influence  2 

    Level Very_Diplomatic
        Description Very_Diplomatic_desc
        EffectsDescription Very_Diplomatic_effects_desc
        Threshold  4 

        Effect Influence  3 
	Effect LineOfSight 1 

    Level Superb_Diplomat
        Description Superb_Diplomat_desc
        EffectsDescription Superb_Diplomat_effects_desc
        Threshold  8 

        Effect Influence  4 
	Effect LineOfSight 1 

    Level Master_of_Diplomacy
        Description Master_of_Diplomacy_desc
        EffectsDescription Master_of_Diplomacy_effects_desc
        GainMessage Master_of_Diplomacy_gain_desc
        Threshold  16 

        Effect Influence  5 
	Effect LineOfSight 1 

;------------------------------------------
Trait BadDiplomat
    Characters diplomat
    AntiTraits GoodDiplomat

    Level Awkward_Diplomat
        Description Awkward_Diplomat_desc
        EffectsDescription Awkward_Diplomat_effects_desc
        Threshold  2 

        Effect Influence -1 

    Level Poor_Diplomat
        Description Poor_Diplomat_desc
        EffectsDescription Poor_Diplomat_effects_desc
        Threshold  4 

        Effect Influence -2 

    Level Undiplomatic
        Description Undiplomatic_desc
        EffectsDescription Undiplomatic_effects_desc
        Threshold  8 

        Effect Influence -3

;------------------------------------------
Trait SmoothTalker
    Characters diplomat

    Level Stretches_Loyalties
        Description Stretches_Loyalties_desc
        EffectsDescription Stretches_Loyalties_effects_desc
        Threshold  2 

        Effect Bribery  10 

    Level Breaks_Loyalties
        Description Breaks_Loyalties_desc
        EffectsDescription Breaks_Loyalties_effects_desc
        Threshold  4 

        Effect Bribery  20 

    Level Changes_Loyalties
        Description Changes_Loyalties_desc
        EffectsDescription Changes_Loyalties_effects_desc
        Threshold  6 

        Effect Bribery  30

;------------------------------------------
Trait Talkative
    Characters diplomat
    AntiTraits Secretive

    Level Talkative
        Description Talkative_desc
        EffectsDescription Talkative_effects_desc
        Threshold  2 

        Effect Influence -1 
        Effect Bribery  5 

    Level Gossips
        Description Gossips_desc
        EffectsDescription Gossips_effects_desc
        Threshold  4 

        Effect Influence -2 

    Level Utterly_Indiscreet
        Description Utterly_Indiscreet_desc
        EffectsDescription Utterly_Indiscreet_effects_desc
        Epithet Utterly_Indiscreet_epithet_desc
        Threshold  8 

        Effect Influence -3 
        Effect Bribery -5 

;------------------------------------------
Trait Secretive
    Characters diplomat
    AntiTraits Talkative

    Level Discreet
        Description Discreet_desc
        EffectsDescription Discreet_effects_desc
        Threshold  1 

        Effect Influence  1 

    Level Secretive
        Description Secretive_desc
        EffectsDescription Secretive_effects_desc
        Threshold  2 

        Effect Influence  2 
        Effect Bribery  5 

    Level Impossible_to_Read
        Description Impossible_to_Read_desc
        EffectsDescription Impossible_to_Read_effects_desc
        Threshold  4 

        Effect Influence  3 
        Effect Bribery  10 

;------------------------------------------
Trait Multilingual
    Characters diplomat

    Level Bilingual
        Description Bilingual_desc
        EffectsDescription Bilingual_effects_desc
        Threshold  1 

        Effect Influence  1 

    Level Multilingual
        Description Multilingual_desc
        EffectsDescription Multilingual_effects_desc
        Threshold  2 

        Effect Influence  2 
	Effect LineOfSight 1 

    Level Translator
        Description Translator_desc
        EffectsDescription Translator_effects_desc
        Threshold  3 

        Effect Influence  3 
	Effect LineOfSight 1 

;------------------------------------------
Trait ReligiousTolerance
    Characters diplomat
    AntiTraits ReligiousIntolerance

    Level Not_Dogmatic
        Description Not_Dogmatic_desc
        EffectsDescription Not_Dogmatic_effects_desc
        Threshold  1 

        Effect Influence  1 

    Level Respects_other_Religions
        Description Respects_other_Religions_desc
        EffectsDescription Respects_other_Religions_effects_desc
        Threshold  2 

        Effect Influence  2 

    Level Open_to_all_Religions
        Description Open_to_all_Religions_desc
        EffectsDescription Open_to_all_Religions_effects_desc
        Threshold  3 

        Effect Influence  3 

;------------------------------------------
Trait ReligiousIntolerance
    Characters diplomat
    AntiTraits ReligiousTolerance

    Level Dogmatic_Beliefs
        Description Dogmatic_Beliefs_desc
        EffectsDescription Dogmatic_Beliefs_effects_desc
        Threshold  1 

        Effect Influence -1 

    Level Religiously_Intolerant
        Description Religiously_Intolerant_desc
        EffectsDescription Religiously_Intolerant_effects_desc
        Threshold  2 

        Effect Influence -2 

    Level Would-be-Inquisitor
        Description Would-be-Inquisitor_desc
        EffectsDescription Would-be-Inquisitor_effects_desc
        Threshold  3 

        Effect Influence -3 

;------------------------------------------
Trait BraveDiplomat
    Characters diplomat
    AntiTraits CowardDiplomat

    Level Calm
        Description Calm_desc
        EffectsDescription Calm_effects_desc
        Threshold  1 

        Effect Influence  1 

    Level Sworn_to_Duty
        Description Sworn_to_Duty_desc
        EffectsDescription Sworn_to_Duty_effects_desc
        Threshold  2 

        Effect Influence  2 

    Level Practically_Dauntless
        Description Practically_Dauntless_desc
        EffectsDescription Practically_Dauntless_effects_desc
        Threshold  3 

        Effect Influence  3 
        Effect PersonalSecurity -1 

;------------------------------------------
Trait CowardDiplomat
    Characters diplomat
    AntiTraits BraveDiplomat

    Level Somewhat_Nervous
        Description Somewhat_Nervous_desc
        EffectsDescription Somewhat_Nervous_effects_desc
        Threshold  1 

        Effect Influence -1 

    Level Feeling_the_Risks
        Description Feeling_the_Risks_desc
        EffectsDescription Feeling_the_Risks_effects_desc
        Threshold  2 

        Effect Influence -2 
        Effect PersonalSecurity  1 

    Level Trusts_Nobody
        Description Trusts_Nobody_desc
        EffectsDescription Trusts_Nobody_effects_desc
        Threshold  3 

        Effect Influence -3 
        Effect PersonalSecurity  2

;*********  SPY TRAITS  *********
;------------------------------------------
Trait AgentPiety
    Characters princess, merchant, spy, assassin, diplomat
    Hidden

    Level AgentPiety
        Description AgentPiety_desc
        EffectsDescription AgentPiety_effects_desc
        Threshold  1 

        Effect Piety  10

;------------------------------------------
Trait NaturalSpySkill
    Characters spy

    Level Quietly_Observant
        Description Quietly_Observant_desc
        EffectsDescription Quietly_Observant_effects_desc
        Threshold  1 

        Effect Subterfuge  1 

    Level Spying_Talent
        Description Spying_Talent_desc
        EffectsDescription Spying_Talent_effects_desc
        Threshold  2 

        Effect Subterfuge  2 

    Level Natural_Spy
        Description Natural_Spy_desc
        EffectsDescription Natural_Spy_effects_desc
        Threshold  3 

        Effect Subterfuge  3 

;------------------------------------------
Trait GoodSpy
    Characters spy
    AntiTraits BadSpy

    Level Inconspicuous
        Description Inconspicuous_desc
        EffectsDescription Inconspicuous_effects_desc
        GainMessage Inconspicuous_gain_desc
        LoseMessage Inconspicuous_lose_desc
        Threshold  1 

        Effect Subterfuge  1 
        Effect LineOfSight  1 

    Level Adept_Agent
        Description Adept_Agent_desc
        EffectsDescription Adept_Agent_effects_desc
        GainMessage Adept_Agent_gain_desc
        LoseMessage Adept_Agent_lose_desc
        Threshold  2 

        Effect Subterfuge  2 
        Effect LineOfSight  2 

    Level Spy
        Description Spy_desc
        EffectsDescription Spy_effects_desc
        GainMessage Spy_gain_desc
        LoseMessage Spy_lose_desc
        Threshold  4 

        Effect Subterfuge  3 
        Effect LineOfSight  3 

    Level Adept_Spy
        Description Adept_Spy_desc
        EffectsDescription Adept_Spy_effects_desc
        GainMessage Adept_Spy_gain_desc
        LoseMessage Adept_Spy_lose_desc
        Threshold  8 

        Effect Subterfuge  4 
        Effect LineOfSight  4 

    Level Master_Spy
        Description Master_Spy_desc
        EffectsDescription Master_Spy_effects_desc
        GainMessage Master_Spy_gain_desc
        LoseMessage Master_Spy_lose_desc
        Epithet Master_Spy_epithet_desc
        Threshold  16 

        Effect Subterfuge  5 
        Effect LineOfSight  5 

;------------------------------------------
Trait BadSpy
    Characters spy
    AntiTraits GoodSpy

    Level Conspicuous
        Description Conspicuous_desc
        EffectsDescription Conspicuous_effects_desc
        Threshold  2 

        Effect Subterfuge -1 

    Level Poor_Spy
        Description Poor_Spy_desc
        EffectsDescription Poor_Spy_effects_desc
        Threshold  4 

        Effect Subterfuge -2 

    Level Devoid_of_Subtlety
        Description Devoid_of_Subtlety_desc
        EffectsDescription Devoid_of_Subtlety_effects_desc
        Threshold  6 

        Effect Subterfuge -3 

;------------------------------------------
Trait ThievesGuildMember
    Characters spy

    Level Thieves'_Guild_Apprentice
        Description Thieves'_Guild_Apprentice_desc
        EffectsDescription Thieves'_Guild_Apprentice_effects_desc
        Threshold  1 

        Effect Subterfuge  1 
        Effect LineOfSight  1 

    Level Thieves'_Guild_Journeyman
        Description Thieves'_Guild_Journeyman_desc
        EffectsDescription Thieves'_Guild_Journeyman_effects_desc
        Threshold  2 

        Effect Subterfuge  2 
        Effect LineOfSight  2 
        Effect MovementPoints  2 

;------------------------------------------
Trait ThievesGuildTrained
    Characters spy

    Level Trained_in_Espionage
        Description Trained_in_Espionage_desc
        EffectsDescription Trained_in_Espionage_effects_desc
        Threshold  1 

        Effect Subterfuge  1

;*********  ASSASSIN TRAITS  *********
;------------------------------------------
Trait NaturalAssassinSkill
    Characters assassin

    Level Cold_Killer
        Description Cold_Killer_desc
        EffectsDescription Cold_Killer_effects_desc
        Threshold  1 

        Effect Subterfuge  1 

    Level Talent_for_Murder
        Description Talent_for_Murder_desc
        EffectsDescription Talent_for_Murder_effects_desc
        Threshold  2 

        Effect Subterfuge  2 

    Level Born_to_Kill
        Description Born_to_Kill_desc
        EffectsDescription Born_to_Kill_effects_desc
        Threshold  3 

        Effect Subterfuge  3

;------------------------------------------
Trait GoodAssassin
    Characters assassin
    AntiTraits BadAssassin

    Level Hired_Blade
        Description Hired_Blade_desc
        EffectsDescription Hired_Blade_effects_desc
        GainMessage Hired_Blade_gain_desc
        LoseMessage Hired_Blade_lose_desc
        Threshold  1 

        Effect Subterfuge  1 

    Level Assassin
        Description Assassin_desc
        EffectsDescription Assassin_effects_desc
        GainMessage Assassin_gain_desc
        LoseMessage Assassin_lose_desc
        Threshold  2 

        Effect Subterfuge  2 

    Level Murderer
        Description Murderer_desc
        EffectsDescription Murderer_effects_desc
        GainMessage Murderer_gain_desc
        LoseMessage Murderer_lose_desc
        Threshold  4 

        Effect Subterfuge  3 

    Level Adept_Assassin
        Description Adept_Assassin_desc
        EffectsDescription Adept_Assassin_effects_desc
        GainMessage Adept_Assassin_gain_desc
        LoseMessage Adept_Assassin_lose_desc
        Epithet Adept_Assassin_epithet_desc
        Threshold  8 

        Effect Subterfuge  4 

    Level Master_Assassin
        Description Master_Assassin_desc
        EffectsDescription Master_Assassin_effects_desc
        GainMessage Master_Assassin_gain_desc
        LoseMessage Master_Assassin_lose_desc
        Epithet Master_Assassin_epithet_desc
        Threshold  16 

        Effect Subterfuge  5 

;------------------------------------------
Trait BadAssassin
    Characters assassin
    AntiTraits GoodAssassin

    Level Killer_on_Edge
        Description Killer_on_Edge_desc
        EffectsDescription Killer_on_Edge_effects_desc
        Threshold  2 

        Effect Subterfuge -1 

    Level Not_an_Assassin
        Description Not_an_Assassin_desc
        EffectsDescription Not_an_Assassin_effects_desc
        Threshold  4 

        Effect Subterfuge -2 

    Level Not_a_Killer
        Description Not_a_Killer_desc
        EffectsDescription Not_a_Killer_effects_desc
        Threshold  6 

        Effect Subterfuge -3

;------------------------------------------
Trait GoodConspirator
    Characters spy, assassin
    AntiTraits BadConspirator

    Level Plotter
        Description Plotter_desc
        EffectsDescription Plotter_effects_desc
        Threshold  2 

        Effect Subterfuge  1 

    Level Schemer
        Description Schemer_desc
        EffectsDescription Schemer_effects_desc
        Threshold  4 

        Effect Subterfuge  2 

    Level Grand_Conspirator
        Description Grand_Conspirator_desc
        EffectsDescription Grand_Conspirator_effects_desc
        Threshold  8 

        Effect Subterfuge  3 

;------------------------------------------
Trait BadConspirator
    Characters spy, assassin
    AntiTraits GoodConspirator

    Level Poor_Plotter
        Description Poor_Plotter_desc
        EffectsDescription Poor_Plotter_effects_desc
        Threshold  2 

        Effect Subterfuge -1 

    Level Silly_Schemes
        Description Silly_Schemes_desc
        EffectsDescription Silly_Schemes_effects_desc
        Threshold  4 

        Effect Subterfuge -2 

    Level Lost_the_Plot
        Description Lost_the_Plot_desc
        EffectsDescription Lost_the_Plot_effects_desc
        Threshold  8 

        Effect Subterfuge -3

;------------------------------------------
Trait AssassinsGuildMember
    Characters assassin

    Level Assassins'_Guild_Apprentice
        Description Assassins'_Guild_Apprentice_desc
        EffectsDescription Assassins'_Guild_Apprentice_effects_desc
        Threshold  1 

        Effect Subterfuge  1 

    Level Assassins'_Guild_Journeyman
        Description Assassins'_Guild_Journeyman_desc
        EffectsDescription Assassins'_Guild_Journeyman_effects_desc
        Threshold  2 

        Effect Subterfuge  2 
        Effect PersonalSecurity 1 
        Effect PublicSecurity 1 

;------------------------------------------
Trait HashashinsGuildMember
    Characters assassin

    Level Hashashins'_Guild_Apprentice
        Description Hashashins'_Guild_Apprentice_desc
        EffectsDescription Hashashins'_Guild_Apprentice_effects_desc
        Threshold  1 

        Effect Subterfuge  1 

    Level Hashashins'_Guild_Journeyman
        Description Hashashins'_Guild_Journeyman_desc
        EffectsDescription Hashashins'_Guild_Journeyman_effects_desc
        Threshold  2 

        Effect Subterfuge  2 
        Effect PersonalSecurity 1 
        Effect PublicSecurity 1 

;------------------------------------------
Trait AssassinsGuildTrained
    Characters assassin

    Level Trained_Killer
        Description Trained_Killer_desc
        EffectsDescription Trained_Killer_effects_desc
        Threshold  1 

        Effect Subterfuge  1

;*********  WITCH TRAITS  *********
;------------------------------------------
Trait NaturalWitchSkill
    Characters witch

    Level Little_Aptitude
        Description Little_Aptitude_desc
        EffectsDescription Little_Aptitude_effects_desc
        Threshold  1 

        Effect Magic  1 

    Level Some_Aptitude
        Description Some_Aptitude_desc
        EffectsDescription Some_Aptitude_effects_desc
        Threshold  2 

        Effect Magic  2 

    Level Great_Aptitude
        Description Great_Aptitude_desc
        EffectsDescription Great_Aptitude_effects_desc
        Threshold  3 

        Effect Magic  3 

    Level Powerful_Channeler
        Description Powerful_Channeler_desc
        EffectsDescription Powerful_Channeler_effects_desc
        Threshold  4 

        Effect Magic  4 

    Level Creature_of_Dark_Arts
        Description Creature_of_Dark_Arts_desc
        EffectsDescription Creature_of_Dark_Arts_effects_desc
        Threshold  5 

        Effect Magic  5 

;------------------------------------------
Trait Wrath
    Characters witch
    AntiTraits Unwrath

    Level Agitated
        Description Agitated_desc
        EffectsDescription Agitated_effects_desc
        Threshold  1 

        Effect Magic  2 

    Level Angry
        Description Angry_desc
        EffectsDescription Angry_effects_desc
        Threshold  2 

        Effect Magic  4 

    Level Seething_with_Rage
        Description Seething_with_Rage_desc
        EffectsDescription Seething_with_Rage_effects_desc
        Threshold  3 

        Effect Magic  6 

;------------------------------------------
Trait Unwrath
    Characters witch
    Hidden
    AntiTraits Wrath

    Level No_Wrath
        Description No_Wrath_desc
        EffectsDescription No_Wrath_effects_desc
        Threshold  20 

        Effect GunpowderCommand -1 

;*********  HERETIC TRAITS  *********
;------------------------------------------
Trait NaturalHereticSkill
    Characters heretic

    Level New_Faith
        Description New_Faith_desc
        EffectsDescription New_Faith_effects_desc
        Threshold  1 

        Effect Piety  1 

    Level New_Conviction
        Description New_Conviction_desc
        EffectsDescription New_Conviction_effects_desc
        Threshold  2 

        Effect Piety  2 

    Level Spiritually_Reborn
        Description Spiritually_Reborn_desc
        EffectsDescription Spiritually_Reborn_effects_desc
        Threshold  3 

        Effect Piety  3

;*********  BYG'S REALITY & SUPPLY TRAITS  *********
Trait Healing
    Characters family

    Level Battle_Hardened
        Description Battle_Hardened_desc
        EffectsDescription Battle_Hardened_effects_desc
        Threshold  1

        Effect BattleSurgery  70 
        Effect Command  3
        Effect TroopMorale  3
        Effect Attack  3 
        Effect Defence  3 
        Effect LineOfSight  5 


    Level Battle_Weakened
        Description Battle_Weakened_desc
        EffectsDescription Battle_Weakened_effects_desc
        Threshold  2


;------------------------------------------
Trait MVC
    Characters family

    Level First_Major_New_Victory
        Description First_Major_New_Victory_desc
        EffectsDescription First_Major_New_Victory_effects_desc
        GainMessage First_Major_New_Victory_gain_desc
        Threshold  1 


    Level Second_Major_New_Victory
        Description Second_Major_New_Victory_desc
        EffectsDescription Second_Major_New_Victory_effects_desc
        GainMessage Second_Major_New_Victory_gain_desc
        Threshold  2 


    Level Third_Major_New_Victory
        Description Third_Major_New_Victory_desc
        EffectsDescription Third_Major_New_Victory_effects_desc
        GainMessage Third_Major_New_Victory_gain_desc
        Threshold  3 


    Level Fourth_Major_New_Victory
        Description Fourth_Major_New_Victory_desc
        EffectsDescription Fourth_Major_New_Victory_effects_desc
        GainMessage Fourth_Major_New_Victory_gain_desc
        Threshold  4 


    Level Fifth_Major_New_Victory
        Description Fifth_Major_New_Victory_desc
        EffectsDescription Fifth_Major_New_Victory_effects_desc
        Threshold  5 

;------------------------------------------
Trait FMVC
    Characters family

    Level One_Great_Monument
        Description One_Great_Monument_desc
        EffectsDescription One_Great_Monument_effects_desc
        GainMessage One_Great_Monument_gain_desc
        Threshold  1 


    Level Two_Great_Monuments
        Description Two_Great_Monuments_desc
        EffectsDescription Two_Great_Monuments_effects_desc
        Threshold  2 


    Level Three_Great_Monuments
        Description Three_Great_Monuments_desc
        EffectsDescription Three_Great_Monuments_effects_desc
        Threshold  3 


    Level Four_Great_Monuments
        Description Four_Great_Monuments_desc
        EffectsDescription Four_Great_Monuments_effects_desc
        Threshold  4 


    Level Five_Great_Monuments
        Description Five_Great_Monuments_desc
        EffectsDescription Five_Great_Monuments_effects_desc
        Threshold  5 

;------------------------------------------
Trait TMVC
    Characters family

    Level One_Spectacular_Monument
        Description One_Spectacular_Monument_desc
        EffectsDescription One_Spectacular_Monument_effects_desc
        GainMessage One_Spectacular_Monument_gain_desc
        Threshold  1 


    Level Two_Spectacular_Monuments
        Description Two_Spectacular_Monuments_desc
        EffectsDescription Two_Spectacular_Monuments_effects_desc
        Threshold  2 


    Level Three_Spectacular_Monuments
        Description Three_Spectacular_Monuments_desc
        EffectsDescription Three_Spectacular_Monuments_effects_desc
        Threshold  3 


    Level Four_Spectacular_Monuments
        Description Four_Spectacular_Monuments_desc
        EffectsDescription Four_Spectacular_Monuments_effects_desc
        Threshold  4 

        Effect TroopMorale  3

    Level Five_Spectacular_Monuments
        Description Five_Spectacular_Monuments_desc
        EffectsDescription Five_Spectacular_Monuments_effects_desc
        Threshold  5 

        Effect TroopMorale  3

;------------------------------------------
Trait SB
        Characters family

        Level Complacent
        Description Complacent_desc
        EffectsDescription Complacent_effects_desc
        Threshold 2

        Effect Command  -1
        Effect TroopMorale  -2

        Level Slack
        Description Slack_desc
        EffectsDescription Slack_effects_desc
        Threshold 3

        Effect Command  -2
        Effect TroopMorale  -4

;------------------------------------------
Trait Away
    Characters family
    Hidden

    Level Away
        Description Away_desc
        EffectsDescription Away_effects_desc
        Threshold  1 


;------------------------------------------
Trait Turnsaway
    Characters family
    AntiTraits Turnshome

    Level Bent_On_Glory
        Description Bent_On_Glory_desc
        EffectsDescription Bent_On_Glory_effects_desc
        GainMessage Bent_On_Glory_gain_desc
        Threshold  4 

        Effect Loyalty  -2 
        Effect TroopMorale  3 

    Level Eager_To_Fight
        Description Eager_To_Fight_desc
        EffectsDescription Eager_To_Fight_effects_desc
        Threshold  8 

        Effect TroopMorale  2 

    Level Ready_For_Action
        Description Ready_For_Action_desc
        EffectsDescription Ready_For_Action_effects_desc
        Threshold  12 

    Level Troops_Weary
        Description Troops_Weary_desc
        EffectsDescription Troops_Weary_effects_desc
        Threshold  16 

        Effect TroopMorale  -2 

    Level Troops_Despondent
        Description Troops_Despondent_desc
        EffectsDescription Troops_Despondent_effects_desc
        Threshold  20 

        Effect TroopMorale  -4 

    Level Troops_Undisciplined
        Description Troops_Undisciplined_desc
        EffectsDescription Troops_Undisciplined_effects_desc
        GainMessage Troops_Undisciplined_gain_desc
        Threshold  24 

        Effect Command -1 
        Effect TroopMorale  -6 
        Effect Unrest  1 
        Effect Loyalty  -1 

    Level Troops_Desperate
        Description Troops_Desperate_desc
        EffectsDescription Troops_Desperate_effects_desc
        GainMessage Troops_Desperate_gain_desc
        Threshold  28

        Effect Command -2 
        Effect TroopMorale  -8 
        Effect Unrest  2 
        Effect Loyalty  -2 
 
    Level Troops_Mutinous
        Description Troops_Mutinous_desc
        EffectsDescription Troops_Mutinous_effects_desc
        GainMessage Troops_Mutinous_gain_desc
        Threshold  32
 
        Effect Command -3 
        Effect TroopMorale  -10 
        Effect Unrest  5 
        Effect Loyalty  -5 

    Level Too_Many_Years_Away
        Description Too_Many_Years_Away_desc
        EffectsDescription Too_Many_Years_Away_effects_desc
        Threshold  36

        Effect Command -5 
        Effect TroopMorale  -10 
        Effect Unrest  5 
        Effect Loyalty  -5 

;------------------------------------------
Trait Turnshome
    Characters family
    AntiTraits Turnsaway

    Level Settled
        Description Settled_desc
        EffectsDescription Settled_effects_desc
        Threshold  4


;------------------------------------------
Trait Con
    Characters family
    AntiTraits Ovcon

    Level Confident
        Description Confident_desc
        EffectsDescription Confident_effects_desc
        Threshold  4 


;------------------------------------------
Trait Ovcon
    Characters family
    AntiTraits Con

    Level Self_Assured
        Description Self_Assured_desc
        EffectsDescription Self_Assured_effects_desc
        Threshold  1 

        Effect TroopMorale  +1 

    Level Overconfident
        Description Overconfident_desc
        EffectsDescription Overconfident_effects_desc
        Threshold  7 

        Effect Attack -3 
        Effect Defence -3 
        Effect SiegeAttack -3 
        Effect TroopMorale  -3 

    Level Blatantly_Overconfident
        Description Blatantly_Overconfident_desc
        EffectsDescription Blatantly_Overconfident_effects_desc
        Threshold  14 

        Effect Attack -6 
        Effect Defence -6 
        Effect SiegeAttack -6 
        Effect TroopMorale  -6 


;------------------------------------------
Trait Supplies
    Characters family
    AntiTraits SuppliesAdded

    Level Army_Fully_Supplied
        Description Army_Fully_Supplied_desc
        EffectsDescription Army_Fully_Supplied_effects_desc
        Threshold  1 

        Effect Charm  5 
        Effect MovementPoints -5 

    Level Army_Supplies_75_Percent
        Description Army_Supplies_75_Percent_desc
        EffectsDescription Army_Supplies_75_Percent_effects_desc
        Threshold  2 

        Effect Charm  5 
        Effect MovementPoints -4 

    Level Army_Supplies_50_Percent
        Description Army_Supplies_50_Percent_desc
        EffectsDescription Army_Supplies_50_Percent_effects_desc
        Threshold  3 

        Effect Charm  5 
        Effect MovementPoints -3 
        Effect Unrest  1 

    Level Army_Supplies_25_Percent
        Description Army_Supplies_25_Percent_desc
        EffectsDescription Army_Supplies_25_Percent_effects_desc
        Threshold  4 

        Effect MovementPoints -2 
        Effect TroopMorale  -4 
        Effect Unrest  2 

    Level Using_Emergency_Supplies
        Description Using_Emergency_Supplies_desc
        EffectsDescription Using_Emergency_Supplies_effects_desc
;        GainMessage Using_Emergency_Supplies_gain_desc
        Threshold  5 

        Effect TroopMorale  -2 
        Effect Unrest  2 

    Level Out_Of_Supplies
        Description Out_Of_Supplies_desc
        EffectsDescription Out_Of_Supplies_effects_desc
;        GainMessage Out_Of_Supplies_gain_desc
        Threshold  6 

        Effect Command -2 
        Effect TroopMorale  -4 
        Effect Loyalty -2 
        Effect Unrest  3 
        Effect MovementPoints -4


;unrest here represents when you enter a settlement you take more supplies from population, depriving them more
;------------------------------------------
Trait SuppliesAdded
    Characters family
    AntiTraits Supplies

    Level Supplies_Added
        Description Supplies_Added_desc
        EffectsDescription Supplies_Added_effects_desc
        Threshold  1 

;------------------------------------------
Trait TimeInField
    Characters family
    AntiTraits TIFReset

    Level TIF1
        Description TIF1_desc
        EffectsDescription TIF1_effects_desc
        Threshold  1 


    Level TIF2
        Description TIF2_desc
        EffectsDescription TIF2_effects_desc
        Threshold  2 


    Level TIF3
        Description TIF3_desc
        EffectsDescription TIF3_effects_desc
        Threshold  3 


    Level TIF4
        Description TIF4_desc
        EffectsDescription TIF4_effects_desc
        Threshold  4 

;Checks time in home region outdoors to compare with timein region, so time in settlement doesn't confuse trait
;------------------------------------------
Trait TIFReset
    Characters family
    AntiTraits TimeInField

    Level TIFR
        Description TIFR_desc
        EffectsDescription TIFR_effects_desc
        Threshold  4

;------------------------------------------
Trait SuppliedBySea
    Characters family

    Level On_Supply_Ship
        Description On_Supply_Ship_desc
        EffectsDescription On_Supply_Ship_effects_desc
        Threshold  1 

;------------------------------------------
Trait Dishonor
    Characters family
    AntiTraits NoDishonor

    Level Neglected_Border_Defences
        Description Neglected_Border_Defences_desc
        EffectsDescription Neglected_Border_Defences_effects_desc
        GainMessage Neglected_Border_Defences_gain_desc
        Threshold  1 

        Effect Unrest  1 

    Level Negligent
        Description Negligent_desc
        EffectsDescription Negligent_effects_desc
        Threshold  3 

        Effect Defence -2 
        Effect TroopMorale  -2 
        Effect Loyalty -1 
        Effect Unrest  2 

    Level Completely_Negligent
        Description Completely_Negligent_desc
        EffectsDescription Completely_Negligent_effects_desc
        Threshold  5 

        Effect Defence -3 
        Effect TroopMorale  -4 
        Effect Loyalty -2 
        Effect Unrest  3 

;attack effect is in besieged trait
;------------------------------------------
Trait NoDishonor
    Characters family
    AntiTraits Dishonor

    Level No_Dishonor
        Description No_Dishonor_desc
        EffectsDescription No_Dishonor_effects_desc
        Threshold  1 


;------------------------------------------
Trait Besieged
    Characters family
    Hidden
    AntiTraits NotBesieged


    Level UnderSiege
        Description UnderSiege_desc
        EffectsDescription UnderSiege_effects_desc
        Threshold  1 

        Effect Attack -3 
        Effect Unrest  2 

    Level UnderSiegeAgain
        Description UnderSiegeAgain_desc
        EffectsDescription UnderSiegeAgain_effects_desc
        Threshold  2 

        Effect Attack -6 
        Effect Unrest  4 

;enable hidden after testing
;------------------------------------------
Trait NotBesieged
    Characters family
    Hidden
    AntiTraits Besieged


    Level NotUnderSiege
        Description NotUnderSiege_desc
        EffectsDescription NotUnderSiege_effects_desc
        Threshold  4 


;enable hidden after testing
;------------------------------------------
Trait PoorLogistics
    Characters family
    AntiTraits AdvisedOnLogistics

    Level Poor_Logistician
        Description Poor_Logistician_desc
        EffectsDescription Poor_Logistician_effects_desc
        Threshold  1 

        Effect Command -1 
        Effect TroopMorale  -2 
        Effect MovementPoints -2 

    Level Good_Logistician
        Description Good_Logistician_desc
        EffectsDescription Good_Logistician_effects_desc
        GainMessage Good_Logistician_gain_desc
        Threshold  2 

;       Effect Command  1 
;       Effect TroopMorale  2 
        Effect MovementPoints  1 
;        Effect BattleSurgery  10 
;        Effect Charm  5 
        Effect Piety  2 

;Lvl 1 Will make resupply take longer (2xlonger than standard). Lvl 2 =2x faster resupply than standard and some resupply in non own religion settlements.
;------------------------------------------
Trait AdvisedOnLogistics
    Characters family
    AntiTraits PoorLogistics

    Level Advised_On_Logistics
        Description Advised_On_Logistics_desc
        EffectsDescription Advised_On_Logistics_effects_desc
        Threshold  2 

;10-01-2008 changed thresh to 2 from 1 (may be better for reset)
;------------------------------------------
Trait WarCouncilMember
    Characters family

    Level War_Council_Member
        Description War_Council_Member_desc
        EffectsDescription War_Council_Member_effects_desc
        GainMessage War_Council_Member_gain_desc
        Threshold  1 

;------------------------------------------
Trait SuppressAuthority
    Characters family
    Hidden
    AntiTraits AntiSuppress

    Level Suppress1
        Description Suppress1_desc
        EffectsDescription Suppress1_effects_desc
        Threshold  1 

        Effect Authority -1 

    Level Suppress2
        Description Suppress2_desc
        EffectsDescription Suppress2_effects_desc
        Threshold  2 

        Effect Authority -2 

    Level Suppress3
        Description Suppress3_desc
        EffectsDescription Suppress3_effects_desc
        Threshold  3 

        Effect Authority -3 

    Level Suppress4
        Description Suppress4_desc
        EffectsDescription Suppress4_effects_desc
        Threshold  4 

        Effect Authority -4 

    Level Suppress5
        Description Suppress5_desc
        EffectsDescription Suppress5_effects_desc
        Threshold  5 

        Effect Authority -5 

    Level Suppress6
        Description Suppress6_desc
        EffectsDescription Suppress6_effects_desc
        Threshold  6 

        Effect Authority -6 

    Level Suppress7
        Description Suppress7_desc
        EffectsDescription Suppress7_effects_desc
        Threshold  7 

        Effect Authority -7 

;------------------------------------------
Trait AntiSuppress
    Characters family
    Hidden
    AntiTraits SuppressAuthority

    Level AntiSuppress1
        Description AntiSuppress1_desc
        EffectsDescription AntiSuppress1_effects_desc
        Threshold  4 

;------------------------------------------
Trait StopR
    Characters family
    Hidden
    AntiTraits StartR

    Level Impaired_Recruitment_Ability
        Description Impaired_Recruitment_Ability_desc
        EffectsDescription Impaired_Recruitment_Ability_effects_desc
        Threshold  1

Effect Charm -1 

;------------------------------------------
Trait StartR
    Characters family
    Hidden
    AntiTraits StopR

    Level Reenable_Recruitment
        Description Reenable_Recruitment_desc
        EffectsDescription Reenable_Recruitment_effects_desc
        Threshold  1

;------------------------------------------
Trait GeneralZeal
    Characters family
;    Hidden
    AntiTraits GeneralZealReset

    Level General_Zeal_High
        Description General_Zeal_High_desc
        EffectsDescription General_Zeal_High_effects_desc
        Threshold  1

    Level General_Zeal_Waning
        Description General_Zeal_Waning_desc
        EffectsDescription General_Zeal_Waning_effects_desc
        Threshold  2

Effect Loyalty -1 
Effect Command -1 
Effect Piety -1 
        Effect SiegeAttack -1 
        Effect TroopMorale  -1 
        Effect BribeResistance -3 

    Level General_Zeal_Low
        Description General_Zeal_Low_desc
        EffectsDescription General_Zeal_Low_effects_desc
        Threshold  3

Effect Loyalty -2 
Effect Command -1 
Effect Piety -2 
        Effect Attack -1 
        Effect Defence -1 
        Effect SiegeAttack -2 
        Effect TroopMorale  -2 
        Effect BribeResistance -4 

    Level General_Zeal_Very_Low
        Description General_Zeal_Very_Low_desc
        EffectsDescription General_Zeal_Very_Low_effects_desc
        Threshold  4

Effect Loyalty -3 
Effect Command -2 
Effect Piety -2 
        Effect Attack -1 
        Effect Defence -1 
        Effect SiegeAttack -3 
        Effect TroopMorale  -3 
        Effect BribeResistance -5 

    Level General_Zeal_Abysmal
        Description General_Zeal_Abysmal_desc
        EffectsDescription General_Zeal_Abysmal_effects_desc
        Threshold  5

Effect Loyalty -4 
Effect Command -2
Effect Piety -3 
        Effect Attack -2 
        Effect Defence -2 
        Effect SiegeAttack -4 
        Effect TroopMorale  -4 
        Effect BribeResistance -6 

;------------------------------------------
Trait GeneralZealReset
    Characters family
;    Hidden
    AntiTraits GeneralZeal

    Level ResetGeneralZeal
        Description ResetGeneralZeal_desc
        EffectsDescription ResetGeneralZeal_effects_desc
        Threshold  5

;------------------------------------------
Trait FactionZeal
    Characters family
;    Hidden
    AntiTraits ZealReset

    Level Faction_Zeal_High
        Description Faction_Zeal_High_desc
        EffectsDescription Faction_Zeal_High_effects_desc
        GainMessage Faction_Zeal_High_gain_desc
        Threshold  1

    Level Faction_Zeal_Waning
        Description Faction_Zeal_Waning_desc
        EffectsDescription Faction_Zeal_Waning_effects_desc
        GainMessage Faction_Zeal_Waning_gain_desc
        Threshold  2

    Level Faction_Zeal_Low
        Description Faction_Zeal_Low_desc
        EffectsDescription Faction_Zeal_Low_effects_desc
        GainMessage Faction_Zeal_Low_gain_desc
        Threshold  3

    Level Faction_Zeal_Very_Low
        Description Faction_Zeal_Very_Low_desc
        EffectsDescription Faction_Zeal_Very_Low_effects_desc
        GainMessage Faction_Zeal_Very_Low_gain_desc
        Threshold  4

    Level Faction_Zeal_Abysmal
        Description Faction_Zeal_Abysmal_desc
        EffectsDescription Faction_Zeal_Abysmal_effects_desc
        GainMessage Faction_Zeal_Abysmal_gain_desc
        Threshold  5

;------------------------------------------
Trait ZealReset
    Characters family
;    Hidden
    AntiTraits FactionZeal

    Level ResetZeal
        Description ResetZeal_desc
        EffectsDescription ResetZeal_effects_desc
        Threshold  5

;------------------------------------------
Trait RecruitmentLimited
    Characters family

    Level Recruitment_Limit_Reached
        Description Recruitment_Limit_Reached_desc
        EffectsDescription Recruitment_Limit_Reached_effects_desc
        Threshold  1

    Level Recruitment_Limit_Message
        Description Recruitment_Limit_Message_desc
        EffectsDescription Recruitment_Limit_Message_effects_desc
        GainMessage Recruitment_Limit_Message_gain_desc
        Threshold  2

    Level Recruits_Available
        Description Recruits_Available_desc
        EffectsDescription Recruits_Available_effects_desc
        GainMessage Recruits_Available_gain_desc
        Threshold  3

;------------------------------------------
Trait GainRL
    Characters family

    Level GainRL1
        Description GainRL1_desc
        EffectsDescription GainRL1_effects_desc
        Threshold  1

;------------------------------------------
Trait CentralisedPower
    Characters family

    Level Universal_Right_to_Knight
        Description Universal_Right_to_Knight_desc
        EffectsDescription Universal_Right_to_Knight_effects_desc
        GainMessage Universal_Right_to_Knight_gain_desc
        Threshold  1

    Level Right_to_Knight_Restricted
        Description Right_to_Knight_Restricted_desc
        EffectsDescription Right_to_Knight_Restricted_effects_desc
        GainMessage Right_to_Knight_Restricted_gain_desc
        Threshold  2

    Level Professional_Recruitment_and_Command
        Description Professional_Recruitment_and_Command_desc
        EffectsDescription Professional_Recruitment_and_Command_effects_desc
        GainMessage Professional_Recruitment_and_Command_gain_desc
        Threshold  3

    Level Centralised_Recruitment_and_Command
        Description Centralised_Recruitment_and_Command_desc
        EffectsDescription Centralised_Recruitment_and_Command_effects_desc
        GainMessage Centralised_Recruitment_and_Command_gain_desc
        Threshold  4

;------------------------------------------
Trait CentralisedPowerEffect
    Characters family
    Hidden
    AntiTraits CentralisedPowerReset

    Level Has_Right_to_Knight
        Description Has_Right_to_Knight_desc
        EffectsDescription Has_Right_to_Knight_effects_desc
        Threshold  1

        Effect Charm  5 

;------------------------------------------
Trait CentralisedPowerReset
    Characters family
    Hidden
    AntiTraits CentralisedPowerEffect

    Level ResetCentralisation
        Description ResetCentralisation_desc
        EffectsDescription ResetCentralisation_effects_desc
        Threshold  1

;------------------------------------------
Trait SupplyMirror
    Characters family
    Hidden

    Level 25_Percent_Supply_Level
        Description 25_Percent_Supply_Level_desc
        EffectsDescription 25_Percent_Supply_Level_effects_desc
        GainMessage 25_Percent_Supply_Level_gain_desc
        Threshold  1

    Level Emergency_Supply_Level
        Description Emergency_Supply_Level_desc
        EffectsDescription Emergency_Supply_Level_effects_desc
        GainMessage Emergency_Supply_Level_gain_desc
        Threshold  2

    Level No_Supplies_Remaining
        Description No_Supplies_Remaining_desc
        EffectsDescription No_Supplies_Remaining_effects_desc
        GainMessage No_Supplies_Remaining_gain_desc
        Threshold  3

;------------------------------------------
Trait RecruitmentAbility
    Characters family


    Level Full_Recruitment_Ability
        Description Full_Recruitment_Ability_desc
        EffectsDescription Full_Recruitment_Ability_effects_desc
        Threshold  1

    Level Average_Recruitment_Ability
        Description Average_Recruitment_Ability_desc
        EffectsDescription Average_Recruitment_Ability_effects_desc
        Threshold  2

    Level Minimal_Recruitment_Ability
        Description Minimal_Recruitment_Ability_desc
        EffectsDescription Minimal_Recruitment_Ability_effects_desc
        Threshold  3

;------------------------------------------
Trait RecruitmentUnauthorised
    Characters family


    Level Recruitment_Unauthorised
        Description Recruitment_Unauthorised_desc
        EffectsDescription Recruitment_Unauthorised_effects_desc
        Threshold  1

;------------------------------------------
Trait Orders
    Characters family


    Level Right_to_Knight
        Description Right_to_Knight_desc
        EffectsDescription Right_to_Knight_effects_desc
        Threshold  1

    Level Order_No_Right_to_Knight
        Description Order_No_Right_to_Knight_desc
        EffectsDescription Order_No_Right_to_Knight_effects_desc
        Threshold  2

    Level Order_Professional_Recruitment
        Description Order_Professional_Recruitment_desc
        EffectsDescription Order_Professional_Recruitment_effects_desc
        Threshold  3

    Level Order_Centralised_Recruitment
        Description Order_Centralised_Recruitment_desc
        EffectsDescription Order_Centralised_Recruitment_effects_desc
        Threshold  4

;------------------------------------------
Trait ReligiousWarTax
    Characters family
    Hidden

    Level Religious_War_Tax
        Description Religious_War_Tax_desc
        EffectsDescription Religious_War_Tax_effects_desc
        GainMessage Religious_War_Tax_gain_desc
        Threshold  1

;------------------------------------------
Trait bgrdeduct
    Characters family

    Level crusade
        Description crusade_desc
        EffectsDescription crusade_effects_desc
        Threshold  1

;------------------------------------------
Trait bgrdeductislam
    Characters family

    Level jihad
        Description jihad_desc
        EffectsDescription jihad_effects_desc
        Threshold  1

;------------------------------------------
Trait crusadecost
    Characters family

    Level Joins_the_Crusade
        Description Joins_the_Crusade_desc
        EffectsDescription Joins_the_Crusade_effects_desc
        GainMessage Joins_the_Crusade_gain_desc
        Threshold  1

;------------------------------------------
Trait jihadcost
    Characters family

    Level Joins_the_Jihad
        Description Joins_the_Jihad_desc
        EffectsDescription Joins_the_Jihad_effects_desc
        GainMessage Joins_the_Jihad_gain_desc
        Threshold  1

;------------------------------------------
Trait SupplyCost
    Characters family

    Level 25_Percent_Supplies_Purchased
        Description 25_Percent_Supplies_Purchased_desc
        EffectsDescription 25_Percent_Supplies_Purchased_effects_desc
;        GainMessage 25_Percent_Supplies_Purchased_gain_desc
        Threshold  1

    Level 50_Percent_Supplies_Purchased
        Description 50_Percent_Supplies_Purchased_desc
        EffectsDescription 50_Percent_Supplies_Purchased_effects_desc
;        GainMessage 50_Percent_Supplies_Purchased_gain_desc
        Threshold  2

    Level 75_Percent_Supplies_Purchased
        Description 75_Percent_Supplies_Purchased_desc
        EffectsDescription 75_Percent_Supplies_Purchased_effects_desc
;        GainMessage 75_Percent_Supplies_Purchased_gain_desc
        Threshold  3

    Level 100_Percent_Supplies_Purchased
        Description 100_Percent_Supplies_Purchased_desc
        EffectsDescription 100_Percent_Supplies_Purchased_effects_desc
;        GainMessage 100_Percent_Supplies_Purchased_gain_desc
        Threshold  4

    Level Extra_Supplies_Purchased
        Description Extra_Supplies_Purchased_desc
        EffectsDescription Extra_Supplies_Purchased_effects_desc
;        GainMessage Extra_Supplies_Purchased_gain_desc
        Threshold  5

;------------------------------------------
Trait SupplyCostMirror
    Characters family
    AntiTraits SupplyCostMirrorReset

    Level 25_Percent_Supplies_PurchasedM
        Description 25_Percent_Supplies_PurchasedM_desc
        EffectsDescription 25_Percent_Supplies_PurchasedM_effects_desc
        GainMessage 25_Percent_Supplies_PurchasedM_gain_desc
        Threshold  1

    Level 50_Percent_Supplies_PurchasedM
        Description 50_Percent_Supplies_PurchasedM_desc
        EffectsDescription 50_Percent_Supplies_PurchasedM_effects_desc
        GainMessage 50_Percent_Supplies_PurchasedM_gain_desc
        Threshold  2

    Level 75_Percent_Supplies_PurchasedM
        Description 75_Percent_Supplies_PurchasedM_desc
        EffectsDescription 75_Percent_Supplies_PurchasedM_effects_desc
        GainMessage 75_Percent_Supplies_PurchasedM_gain_desc
        Threshold  3

    Level 100_Percent_Supplies_PurchasedM
        Description 100_Percent_Supplies_PurchasedM_desc
        EffectsDescription 100_Percent_Supplies_PurchasedM_effects_desc
        GainMessage 100_Percent_Supplies_PurchasedM_gain_desc
        Threshold  4

    Level Extra_Supplies_PurchasedM
        Description Extra_Supplies_PurchasedM_desc
        EffectsDescription Extra_Supplies_PurchasedM_effects_desc
        GainMessage Extra_Supplies_PurchasedM_gain_desc
        Threshold  5

;------------------------------------------
Trait SupplyCostMirrorReset
    Characters family
    AntiTraits SupplyCostMirror

    Level Supply_Cost_Mirror_Reset
        Description Supply_Cost_Mirror_Reset_desc
        EffectsDescription Supply_Cost_Mirror_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait Cost
    Characters family
    Hidden
    AntiTraits CostReset

    Level Cost_1
        Description Cost_1_desc
        EffectsDescription Cost_1_effects_desc
        Threshold  1

    Level Cost_2
        Description Cost_2_desc
        EffectsDescription Cost_2_effects_desc
        Threshold  2

    Level Cost_3
        Description Cost_3_desc
        EffectsDescription Cost_3_effects_desc
        Threshold  3

    Level Cost_4
        Description Cost_4_desc
        EffectsDescription Cost_4_effects_desc
        Threshold  4

    Level Cost_5
        Description Cost_5_desc
        EffectsDescription Cost_5_effects_desc
        Threshold  5

    Level Cost_6
        Description Cost_6_desc
        EffectsDescription Cost_6_effects_desc
        Threshold  6

    Level Cost_7
        Description Cost_7_desc
        EffectsDescription Cost_7_effects_desc
        Threshold  7

    Level Cost_8
        Description Cost_8_desc
        EffectsDescription Cost_8_effects_desc
        Threshold  8

    Level Cost_9
        Description Cost_9_desc
        EffectsDescription Cost_9_effects_desc
        Threshold  9

;------------------------------------------
Trait CostReset
    Characters family
    Hidden
    AntiTraits Cost

    Level CostReset_1
        Description CostReset_1_desc
        EffectsDescription CostReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait Earn
    Characters family
    AntiTraits EarnReset

    Level Earn_1
        Description Earn_1_desc
        EffectsDescription Earn_1_effects_desc
        Threshold  1

    Level Earn_2
        Description Earn_2_desc
        EffectsDescription Earn_2_effects_desc
        Threshold  2

    Level Earn_3
        Description Earn_3_desc
        EffectsDescription Earn_3_effects_desc
        Threshold  3

    Level Earn_4
        Description Earn_4_desc
        EffectsDescription Earn_4_effects_desc
        Threshold  4

    Level Earn_5
        Description Earn_5_desc
        EffectsDescription Earn_5_effects_desc
        Threshold  5

    Level Earn_6
        Description Earn_6_desc
        EffectsDescription Earn_6_effects_desc
        Threshold  6

    Level Earn_7
        Description Earn_7_desc
        EffectsDescription Earn_7_effects_desc
        Threshold  7

    Level Earn_8
        Description Earn_8_desc
        EffectsDescription Earn_8_effects_desc
        Threshold  8

    Level Earn_9
        Description Earn_9_desc
        EffectsDescription Earn_9_effects_desc
        Threshold  9

;------------------------------------------
Trait EarnReset
    Characters family
    AntiTraits Earn

    Level EarnReset_1
        Description EarnReset_1_desc
        EffectsDescription EarnReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait Wealth
    Characters family
    AntiTraits Poverty


    Level Wealth_In_Debt_80
        Description Wealth_In_Debt_80_desc
        EffectsDescription Wealth_In_Debt_80_effects_desc
        Threshold  20

        Effect Command -4 
        Effect TroopMorale -5 
        Effect Loyalty -3 
        Effect Piety -3 
        Effect BribeResistance -4 
        Effect PersonalSecurity -2 

    Level Wealth_In_Debt_60
        Description Wealth_In_Debt_60_desc
        EffectsDescription Wealth_In_Debt_60_effects_desc
        Threshold  40

        Effect Command -3 
        Effect TroopMorale -3 
        Effect Loyalty -2 
        Effect Piety -2 
        Effect BribeResistance -3 
        Effect PersonalSecurity -2 

    Level Wealth_In_Debt_40
        Description Wealth_In_Debt_40_desc
        EffectsDescription Wealth_In_Debt_40_effects_desc
        Threshold  60

        Effect Command -2 
        Effect TroopMorale -2 
        Effect Loyalty -1 
        Effect Piety -1 
        Effect BribeResistance -2 
        Effect PersonalSecurity -2 

    Level Wealth_In_Debt_20
        Description Wealth_In_Debt_20_desc
        EffectsDescription Wealth_In_Debt_20_effects_desc
        Threshold  80

        Effect Command -1 
        Effect TroopMorale -1 
        Effect Loyalty -1 
        Effect Piety -1 
        Effect BribeResistance -2 
        Effect PersonalSecurity -2 

    Level Wealth_Broke
        Description Wealth_Broke_desc
        EffectsDescription Wealth_Broke_effects_desc
        Threshold  100

        Effect Loyalty -1 
        Effect Piety -1 
        Effect BribeResistance -2 
        Effect PersonalSecurity -2 

    Level Wealth_Poor
        Description Wealth_Poor_desc
        EffectsDescription Wealth_Poor_effects_desc
        Threshold  101

        Effect BribeResistance -1 
        Effect PersonalSecurity -1 

    Level Wealth_Adequate
        Description Wealth_Adequate_desc
        EffectsDescription Wealth_Adequate_effects_desc
        Threshold  121

    Level Wealth_Rich
        Description Wealth_Rich_desc
        EffectsDescription Wealth_Rich_effects_desc
        Threshold  141

    Level Wealth_Very_Rich
        Description Wealth_Very_Rich_desc
        EffectsDescription Wealth_Very_Rich_effects_desc
        Threshold  161

;------------------------------------------
Trait Poverty
    Characters family
    AntiTraits Wealth
 
    Level Wealth_Deduct
        Description Wealth_Deduct_desc
        EffectsDescription Wealth_Deduct_effects_desc
        Threshold  1

;------------------------------------------
Trait TreasuryCost
    Characters family
    Hidden
    AntiTraits TCReset

    Level TreasuryCost_1
        Description TreasuryCost_1_desc
        EffectsDescription TreasuryCost_1_effects_desc
        Threshold  1

    Level TreasuryCost_2
        Description TreasuryCost_2_desc
        EffectsDescription TreasuryCost_2_effects_desc
        Threshold  2

    Level TreasuryCost_3
        Description TreasuryCost_3_desc
        EffectsDescription TreasuryCost_3_effects_desc
        Threshold  3

    Level TreasuryCost_4
        Description TreasuryCost_4_desc
        EffectsDescription TreasuryCost_4_effects_desc
        Threshold  4

    Level TreasuryCost_5
        Description TreasuryCost_5_desc
        EffectsDescription TreasuryCost_5_effects_desc
        Threshold  5

    Level TreasuryCost_6
        Description TreasuryCost_6_desc
        EffectsDescription TreasuryCost_6_effects_desc
        Threshold  6

    Level TreasuryCost_7
        Description TreasuryCost_7_desc
        EffectsDescription TreasuryCost_7_effects_desc
        Threshold  7

    Level TreasuryCost_8
        Description TreasuryCost_8_desc
        EffectsDescription TreasuryCost_8_effects_desc
        Threshold  8

    Level TreasuryCost_9
        Description TreasuryCost_9_desc
        EffectsDescription TreasuryCost_9_effects_desc
        Threshold  9

;------------------------------------------
Trait TCReset
    Characters family
    Hidden
    AntiTraits TreasuryCost

    Level TCReset_1
        Description TCReset_1_desc
        EffectsDescription TCReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait TreasuryWealth
    Characters family
    Hidden
    AntiTraits TWReset

    Level TreasuryWealth_1
        Description TreasuryWealth_1_desc
        EffectsDescription TreasuryWealth_1_effects_desc
        Threshold  1

    Level TreasuryWealth_2
        Description TreasuryWealth_2_desc
        EffectsDescription TreasuryWealth_2_effects_desc
        Threshold  2

    Level TreasuryWealth_3
        Description TreasuryWealth_3_desc
        EffectsDescription TreasuryWealth_3_effects_desc
        Threshold  3

    Level TreasuryWealth_4
        Description TreasuryWealth_4_desc
        EffectsDescription TreasuryWealth_4_effects_desc
        Threshold  4

    Level TreasuryWealth_5
        Description TreasuryWealth_5_desc
        EffectsDescription TreasuryWealth_5_effects_desc
        Threshold  5

    Level TreasuryWealth_6
        Description TreasuryWealth_6_desc
        EffectsDescription TreasuryWealth_6_effects_desc
        Threshold  6

    Level TreasuryWealth_7
        Description TreasuryWealth_7_desc
        EffectsDescription TreasuryWealth_7_effects_desc
        Threshold  7

    Level TreasuryWealth_8
        Description TreasuryWealth_8_desc
        EffectsDescription TreasuryWealth_8_effects_desc
        Threshold  8

    Level TreasuryWealth_9
        Description TreasuryWealth_9_desc
        EffectsDescription TreasuryWealth_9_effects_desc
        Threshold  9

; for gens in debt paying and all gens receiving
;------------------------------------------
Trait TWReset
    Characters family
    Hidden
    AntiTraits TreasuryWealth

    Level TWReset_1
        Description TWReset_1_desc
        EffectsDescription TWReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait ExpeditionTaxOrder
    Characters family
    AntiTraits ExpeditionTaxOrderReset

    Level Expedition_Tax_Order
        Description Expedition_Tax_Order_desc
        EffectsDescription Expedition_Tax_Order_effects_desc
        GainMessage Expedition_Tax_Order_gain_desc
        LoseMessage Expedition_Tax_Order_lose_desc
        Threshold  1

;------------------------------------------
Trait ExpeditionTaxOrderReset
    Characters family
    AntiTraits ExpeditionTaxOrder

    Level Expedition_Tax_Order_Reset
        Description Expedition_Tax_Order_Reset_desc
        EffectsDescription Expedition_Tax_Order_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait ExpeditionTax
    Characters family
    AntiTraits ExpeditionTaxReset

    Level Expedition_Tax
        Description Expedition_Tax_desc
        EffectsDescription Expedition_Tax_effects_desc
        Threshold  1

;------------------------------------------
Trait ExpeditionTaxReset
    Characters family
    AntiTraits ExpeditionTax

    Level Expedition_Tax_Reset
        Description Expedition_Tax_Reset_desc
        EffectsDescription Expedition_Tax_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait Debt
    Characters family
    AntiTraits DebtReset

    Level Debt_1
        Description Debt_1_desc
        EffectsDescription Debt_1_effects_desc
        GainMessage Debt_1_gain_desc
        Threshold  1

        Effect Loyalty -2 
        Effect Piety -2 
        Effect BribeResistance -3 
        Effect PersonalSecurity -3 
        Effect Unrest  3 
        Effect TaxCollection -3
        Effect LocalPopularity -3 

    Level Debt_2
        Description Debt_2_desc
        EffectsDescription Debt_2_effects_desc
        GainMessage Debt_2_gain_desc
        Threshold  2

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_3
        Description Debt_3_desc
        EffectsDescription Debt_3_effects_desc
        GainMessage Debt_3_gain_desc
        Threshold  3

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_4
        Description Debt_4_desc
        EffectsDescription Debt_4_effects_desc
        GainMessage Debt_4_gain_desc
        Threshold  4

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_5
        Description Debt_5_desc
        EffectsDescription Debt_5_effects_desc
        GainMessage Debt_5_gain_desc
        Threshold  5

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_6
        Description Debt_6_desc
        EffectsDescription Debt_6_effects_desc
        GainMessage Debt_6_gain_desc
        Threshold  6

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_7
        Description Debt_7_desc
        EffectsDescription Debt_7_effects_desc
        GainMessage Debt_7_gain_desc
        Threshold  7

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_8
        Description Debt_8_desc
        EffectsDescription Debt_8_effects_desc
        GainMessage Debt_8_gain_desc
        Threshold  8

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

    Level Debt_9
        Description Debt_9_desc
        EffectsDescription Debt_9_effects_desc
        GainMessage Debt_9_gain_desc
        Threshold  9

        Effect Loyalty -5 
        Effect Piety -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  5 
        Effect TaxCollection -5
        Effect LocalPopularity -5 

;------------------------------------------
Trait DebtReset
    Characters family
    AntiTraits Debt

    Level DebtReset_1
        Description DebtReset_1_desc
        EffectsDescription DebtReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait Tax
    Characters family
    AntiTraits TaxReset

    Level Tax_1
        Description Tax_1_desc
        EffectsDescription Tax_1_effects_desc
        Threshold  1

    Level Tax_2
        Description Tax_2_desc
        EffectsDescription Tax_2_effects_desc
        Threshold  2

    Level Tax_3
        Description Tax_3_desc
        EffectsDescription Tax_3_effects_desc
        Threshold  3

    Level Tax_4
        Description Tax_4_desc
        EffectsDescription Tax_4_effects_desc
        Threshold  4

    Level Tax_5
        Description Tax_5_desc
        EffectsDescription Tax_5_effects_desc
        Threshold  5

    Level Tax_6
        Description Tax_6_desc
        EffectsDescription Tax_6_effects_desc
        Threshold  6

    Level Tax_7
        Description Tax_7_desc
        EffectsDescription Tax_7_effects_desc
        Threshold  7

    Level Tax_8
        Description Tax_8_desc
        EffectsDescription Tax_8_effects_desc
        Threshold  8

    Level Tax_9
        Description Tax_9_desc
        EffectsDescription Tax_9_effects_desc
        Threshold  9

;------------------------------------------
Trait TaxReset
    Characters family
    AntiTraits Tax

    Level TaxReset_1
        Description TaxReset_1_desc
        EffectsDescription TaxReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait TaxEffect
    Characters family
    AntiTraits TaxEffectReset

    Level TaxEffect_1
        Description TaxEffect_1_desc
        EffectsDescription TaxEffect_1_effects_desc
        Threshold  1

;        Effect PersonalSecurity -1 
        Effect Unrest  1 
        Effect LocalPopularity -1 

    Level TaxEffect_2
        Description TaxEffect_2_desc
        EffectsDescription TaxEffect_2_effects_desc
        Threshold  2

;        Effect PersonalSecurity -2 
        Effect Unrest  2 
        Effect LocalPopularity -2 

    Level TaxEffect_3
        Description TaxEffect_3_desc
        EffectsDescription TaxEffect_3_effects_desc
        Threshold  3

;        Effect PersonalSecurity -3 
        Effect Unrest  3 
        Effect LocalPopularity -3 

    Level TaxEffect_4
        Description TaxEffect_4_desc
        EffectsDescription TaxEffect_4_effects_desc
        Threshold  4

;        Effect PersonalSecurity -4 
        Effect Unrest  4 
        Effect LocalPopularity -4 

;------------------------------------------
Trait TaxEffectReset
    Characters family
    AntiTraits TaxEffect

    Level TaxEffectReset_1
        Description TaxEffectReset_1_desc
        EffectsDescription TaxEffectReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait Fines
    Characters family
    AntiTraits FinesReset

    Level Fines_1
        Description Fines_1_desc
        EffectsDescription Fines_1_effects_desc
        Threshold  1

    Level Fines_2
        Description Fines_2_desc
        EffectsDescription Fines_2_effects_desc
        Threshold  2

    Level Fines_3
        Description Fines_3_desc
        EffectsDescription Fines_3_effects_desc
        Threshold  3

    Level Fines_4
        Description Fines_4_desc
        EffectsDescription Fines_4_effects_desc
        Threshold  4

    Level Fines_5
        Description Fines_5_desc
        EffectsDescription Fines_5_effects_desc
        Threshold  5

    Level Fines_6
        Description Fines_6_desc
        EffectsDescription Fines_6_effects_desc
        Threshold  6

    Level Fines_7
        Description Fines_7_desc
        EffectsDescription Fines_7_effects_desc
        Threshold  7

    Level Fines_8
        Description Fines_8_desc
        EffectsDescription Fines_8_effects_desc
        Threshold  8

    Level Fines_9
        Description Fines_9_desc
        EffectsDescription Fines_9_effects_desc
        Threshold  9

;------------------------------------------
Trait FinesReset
    Characters family
    AntiTraits Fines

    Level FinesReset_1
        Description FinesReset_1_desc
        EffectsDescription FinesReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait LeaderDefied
    Characters family
    AntiTraits LeaderDefiedReset

    Level LeaderDefied_1
        Description LeaderDefied_1_desc
        EffectsDescription LeaderDefied_1_effects_desc
        Threshold  1

        Effect PersonalSecurity -5 
        Effect Unrest  20 
        Effect TaxCollection -5
        Effect LocalPopularity -5 
        Effect Loyalty -3
        Effect Command -3
        Effect TroopMorale -5
        Effect Law -5
        Effect Squalor 10

    Level LeaderDefied_2
        Description LeaderDefied_2_desc
        EffectsDescription LeaderDefied_2_effects_desc
        Threshold  2

        Effect Authority -1 
        Effect PersonalSecurity -5 
        Effect Unrest  20 
        Effect TaxCollection -5
        Effect LocalPopularity -5 
        Effect Loyalty -3
        Effect Command -3
        Effect TroopMorale -5
        Effect Law -5
        Effect Squalor 10

    Level LeaderDefied_3
        Description LeaderDefied_3_desc
        EffectsDescription LeaderDefied_3_effects_desc
        Threshold  3

        Effect Authority -2 
        Effect PersonalSecurity -5 
        Effect Unrest  20 
        Effect TaxCollection -5
        Effect LocalPopularity -5 
        Effect Loyalty -3
        Effect Command -3
        Effect TroopMorale -5
        Effect Law -5
        Effect Squalor 10

    Level LeaderDefied_4
        Description LeaderDefied_4_desc
        EffectsDescription LeaderDefied_4_effects_desc
        Threshold  4

        Effect Authority -3 
        Effect PersonalSecurity -5 
        Effect Unrest  20 
        Effect TaxCollection -5
        Effect LocalPopularity -5 
        Effect Loyalty -3
        Effect Command -3
        Effect TroopMorale -5
        Effect Law -5
        Effect Squalor 10

;------------------------------------------
Trait LeaderDefiedReset
    Characters family
    AntiTraits LeaderDefied

    Level LeaderDefiedReset_1
        Description LeaderDefiedReset_1_desc
        EffectsDescription LeaderDefiedReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait DefiedOrders
    Characters family
    AntiTraits DefiedOrdersReset

    Level DefiedOrders_1
        Description DefiedOrders_1_desc
        EffectsDescription DefiedOrders_1_effects_desc
        GainMessage DefiedOrders_1_gain_desc
        Threshold  1

        Effect Loyalty -1 
        Effect Piety -1 
        Effect BribeResistance -1 
        Effect PersonalSecurity -1 
        Effect Unrest  2 
        Effect LocalPopularity -1 

    Level DefiedOrders_2
        Description DefiedOrders_2_desc
        EffectsDescription DefiedOrders_2_effects_desc
        GainMessage DefiedOrders_2_gain_desc
        Threshold  2

        Effect Loyalty -3 
        Effect Piety -3 
        Effect BribeResistance -3 
        Effect PersonalSecurity -3 
        Effect Unrest  4 
        Effect LocalPopularity -3 

    Level DefiedOrders_3
        Description DefiedOrders_3_desc
        EffectsDescription DefiedOrders_3_effects_desc
        GainMessage DefiedOrders_3_gain_desc
        Threshold  3

        Effect Loyalty -5 
        Effect BribeResistance -4 
        Effect PersonalSecurity -4 
        Effect Unrest  6 
        Effect LocalPopularity -4 

    Level DefiedOrders_4
        Description DefiedOrders_4_desc
        EffectsDescription DefiedOrders_4_effects_desc
        GainMessage DefiedOrders_4_gain_desc
        Threshold  4

        Effect Loyalty -5 
        Effect BribeResistance -5 
        Effect PersonalSecurity -5 
        Effect Unrest  8 
        Effect LocalPopularity -5 

;------------------------------------------
Trait DefiedOrdersReset
    Characters family
    AntiTraits DefiedOrders

    Level DefiedOrdersReset_1
        Description DefiedOrdersReset_1_desc
        EffectsDescription DefiedOrdersReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait HasWarchest
    Characters family
    AntiTraits HasWarchestReset

    Level HasWarchest
        Description HasWarchest_desc
        EffectsDescription HasWarchest_effects_desc
        GainMessage HasWarchest_gain_desc
        Threshold  1

        Effect Charm  5 

;------------------------------------------
Trait HasWarchestReset
    Characters family
    AntiTraits HasWarchest

    Level HasWarchestReset
        Description HasWarchestReset_desc
        EffectsDescription HasWarchestReset_effects_desc
        Threshold  1

;------------------------------------------
Trait EstatePurchased
    Characters family
    AntiTraits EstatePurchasedReset

    Level EstatePurchased_1
        Description EstatePurchased_1_desc
        EffectsDescription EstatePurchased_1_effects_desc
        GainMessage EstatePurchased_1_gain_desc
        Threshold  1

;------------------------------------------
Trait EstatePurchasedReset
    Characters family
    AntiTraits EstatePurchased

    Level EstatePurchasedReset_1
        Description EstatePurchasedReset_1_desc
        EffectsDescription EstatePurchasedReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait Estates
    Characters family
    AntiTraits EstatesReset

    Level Estates_1
        Description Estates_1_desc
        EffectsDescription Estates_1_effects_desc
        GainMessage Estates_1_gain_desc
        Threshold  1

        Effect BribeResistance -5 
        Effect PersonalSecurity -5 

    Level Estates_2
        Description Estates_2_desc
        EffectsDescription Estates_2_effects_desc
        GainMessage Estates_2_gain_desc
        Threshold  2

    Level Estates_3
        Description Estates_3_desc
        EffectsDescription Estates_3_effects_desc
        GainMessage Estates_3_gain_desc
        Threshold  3

;------------------------------------------
Trait EstatesReset
    Characters family
    AntiTraits Estates

    Level EstatesReset_1
        Description EstatesReset_1_desc
        EffectsDescription EstatesReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait NotComplied
    Characters family
    AntiTraits NotCompliedReset

    Level NotComplied
        Description NotComplied_desc
        EffectsDescription NotComplied_effects_desc
        GainMessage NotComplied_gain_desc
        Threshold  1

        Effect Loyalty -5 

;------------------------------------------
Trait NotCompliedReset
    Characters family
    AntiTraits NotComplied

    Level NotCompliedReset
        Description NotCompliedReset_desc
        EffectsDescription NotCompliedReset_effects_desc
        Threshold  1

;------------------------------------------
Trait Pardon
    Characters family
    AntiTraits PardonReset

    Level Pardon
        Description Pardon_desc
        EffectsDescription Pardon_effects_desc
        GainMessage Pardon_gain_desc
        Threshold  1

;------------------------------------------
Trait PardonReset
    Characters family
    AntiTraits Pardon

    Level PardonReset
        Description PardonReset_desc
        EffectsDescription PardonReset_effects_desc
        Threshold  1

;------------------------------------------
Trait Pardoned
    Characters family
    AntiTraits PardonedReset

    Level Pardoned
        Description Pardoned_desc
        EffectsDescription Pardoned_effects_desc
        GainMessage Pardoned_gain_desc
        Threshold  1

;------------------------------------------
Trait PardonedReset
    Characters family
    AntiTraits Pardoned

    Level PardonedReset
        Description PardonedReset_desc
        EffectsDescription PardonedReset_effects_desc
        Threshold  1

;------------------------------------------
Trait WealthTax
    Characters family
    AntiTraits WealthTaxReset

    Level WealthTax_1
        Description WealthTax_1_desc
        EffectsDescription WealthTax_1_effects_desc
        GainMessage WealthTax_1_gain_desc
        LoseMessage WealthTax_1_lose_desc
        Threshold  1

;------------------------------------------
Trait WealthTaxReset
    Characters family
    AntiTraits WealthTax

    Level WealthTaxReset_1
        Description WealthTaxReset_1_desc
        EffectsDescription WealthTaxReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait WealthCheck
    Characters family

    Level Wealth_Check
        Description Wealth_Check_desc
        EffectsDescription Wealth_Check_effects_desc
        Threshold  1

;------------------------------------------
Trait MilitaryExpenses
    Characters family
    AntiTraits MilitaryExpensesReset

    Level MilitaryExpenses_1
        Description MilitaryExpenses_1_desc
        EffectsDescription MilitaryExpenses_1_effects_desc
        Threshold  1

    Level MilitaryExpenses_2
        Description MilitaryExpenses_2_desc
        EffectsDescription MilitaryExpenses_2_effects_desc
        Threshold  2

    Level MilitaryExpenses_3
        Description MilitaryExpenses_3_desc
        EffectsDescription MilitaryExpenses_3_effects_desc
        Threshold  3

    Level MilitaryExpenses_4
        Description MilitaryExpenses_4_desc
        EffectsDescription MilitaryExpenses_4_effects_desc
        Threshold  4

    Level MilitaryExpenses_5
        Description MilitaryExpenses_5_desc
        EffectsDescription MilitaryExpenses_5_effects_desc
        Threshold  5

    Level MilitaryExpenses_6
        Description MilitaryExpenses_6_desc
        EffectsDescription MilitaryExpenses_6_effects_desc
        Threshold  6

    Level MilitaryExpenses_7
        Description MilitaryExpenses_7_desc
        EffectsDescription MilitaryExpenses_7_effects_desc
        Threshold  7

    Level MilitaryExpenses_8
        Description MilitaryExpenses_8_desc
        EffectsDescription MilitaryExpenses_8_effects_desc
        Threshold  8

    Level MilitaryExpenses_9
        Description MilitaryExpenses_9_desc
        EffectsDescription MilitaryExpenses_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MilitaryExpensesReset
    Characters family
    AntiTraits MilitaryExpenses

    Level MilitaryExpensesReset_1
        Description MilitaryExpensesReset_1_desc
        EffectsDescription MilitaryExpensesReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait MilitaryExpenses1
    Characters family
    AntiTraits MilitaryExpenses1Reset

    Level MilitaryExpenses1_1
        Description MilitaryExpenses1_1_desc
        EffectsDescription MilitaryExpenses1_1_effects_desc
        Threshold  1

    Level MilitaryExpenses1_2
        Description MilitaryExpenses1_2_desc
        EffectsDescription MilitaryExpenses1_2_effects_desc
        Threshold  2

    Level MilitaryExpenses1_3
        Description MilitaryExpenses1_3_desc
        EffectsDescription MilitaryExpenses1_3_effects_desc
        Threshold  3

    Level MilitaryExpenses1_4
        Description MilitaryExpenses1_4_desc
        EffectsDescription MilitaryExpenses1_4_effects_desc
        Threshold  4

    Level MilitaryExpenses1_5
        Description MilitaryExpenses1_5_desc
        EffectsDescription MilitaryExpenses1_5_effects_desc
        Threshold  5

    Level MilitaryExpenses1_6
        Description MilitaryExpenses1_6_desc
        EffectsDescription MilitaryExpenses1_6_effects_desc
        Threshold  6

    Level MilitaryExpenses1_7
        Description MilitaryExpenses1_7_desc
        EffectsDescription MilitaryExpenses1_7_effects_desc
        Threshold  7

    Level MilitaryExpenses1_8
        Description MilitaryExpenses1_8_desc
        EffectsDescription MilitaryExpenses1_8_effects_desc
        Threshold  8

    Level MilitaryExpenses1_9
        Description MilitaryExpenses1_9_desc
        EffectsDescription MilitaryExpenses1_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MilitaryExpenses1Reset
    Characters family
    AntiTraits MilitaryExpenses1

    Level MilitaryExpenses1Reset_1
        Description MilitaryExpenses1Reset_1_desc
        EffectsDescription MilitaryExpenses1Reset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait MilitaryExpenses2
    Characters family
    AntiTraits MilitaryExpenses2Reset

    Level MilitaryExpenses2_1
        Description MilitaryExpenses2_1_desc
        EffectsDescription MilitaryExpenses2_1_effects_desc
        Threshold  1

    Level MilitaryExpenses2_2
        Description MilitaryExpenses2_2_desc
        EffectsDescription MilitaryExpenses2_2_effects_desc
        Threshold  2

    Level MilitaryExpenses2_3
        Description MilitaryExpenses2_3_desc
        EffectsDescription MilitaryExpenses2_3_effects_desc
        Threshold  3

    Level MilitaryExpenses2_4
        Description MilitaryExpenses2_4_desc
        EffectsDescription MilitaryExpenses2_4_effects_desc
        Threshold  4

    Level MilitaryExpenses2_5
        Description MilitaryExpenses2_5_desc
        EffectsDescription MilitaryExpenses2_5_effects_desc
        Threshold  5

    Level MilitaryExpenses2_6
        Description MilitaryExpenses2_6_desc
        EffectsDescription MilitaryExpenses2_6_effects_desc
        Threshold  6

    Level MilitaryExpenses2_7
        Description MilitaryExpenses2_7_desc
        EffectsDescription MilitaryExpenses2_7_effects_desc
        Threshold  7

    Level MilitaryExpenses2_8
        Description MilitaryExpenses2_8_desc
        EffectsDescription MilitaryExpenses2_8_effects_desc
        Threshold  8

    Level MilitaryExpenses2_9
        Description MilitaryExpenses2_9_desc
        EffectsDescription MilitaryExpenses2_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MilitaryExpenses2Reset
    Characters family
    AntiTraits MilitaryExpenses2

    Level MilitaryExpenses2Reset_1
        Description MilitaryExpenses2Reset_1_desc
        EffectsDescription MilitaryExpenses2Reset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait MilitaryExpenses3
    Characters family
    AntiTraits MilitaryExpenses3Reset

    Level MilitaryExpenses3_1
        Description MilitaryExpenses3_1_desc
        EffectsDescription MilitaryExpenses3_1_effects_desc
        Threshold  1

    Level MilitaryExpenses3_2
        Description MilitaryExpenses3_2_desc
        EffectsDescription MilitaryExpenses3_2_effects_desc
        Threshold  2

    Level MilitaryExpenses3_3
        Description MilitaryExpenses3_3_desc
        EffectsDescription MilitaryExpenses3_3_effects_desc
        Threshold  3

    Level MilitaryExpenses3_4
        Description MilitaryExpenses3_4_desc
        EffectsDescription MilitaryExpenses3_4_effects_desc
        Threshold  4

    Level MilitaryExpenses3_5
        Description MilitaryExpenses3_5_desc
        EffectsDescription MilitaryExpenses3_5_effects_desc
        Threshold  5

    Level MilitaryExpenses3_6
        Description MilitaryExpenses3_6_desc
        EffectsDescription MilitaryExpenses3_6_effects_desc
        Threshold  6

    Level MilitaryExpenses3_7
        Description MilitaryExpenses3_7_desc
        EffectsDescription MilitaryExpenses3_7_effects_desc
        Threshold  7

    Level MilitaryExpenses3_8
        Description MilitaryExpenses3_8_desc
        EffectsDescription MilitaryExpenses3_8_effects_desc
        Threshold  8

    Level MilitaryExpenses3_9
        Description MilitaryExpenses3_9_desc
        EffectsDescription MilitaryExpenses3_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MilitaryExpenses3Reset
    Characters family
    AntiTraits MilitaryExpenses3

    Level MilitaryExpenses3Reset_1
        Description MilitaryExpenses3Reset_1_desc
        EffectsDescription MilitaryExpenses3Reset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait MilitaryExpenses4
    Characters family
    AntiTraits MilitaryExpenses4Reset

    Level MilitaryExpenses4_1
        Description MilitaryExpenses4_1_desc
        EffectsDescription MilitaryExpenses4_1_effects_desc
        Threshold  1

    Level MilitaryExpenses4_2
        Description MilitaryExpenses4_2_desc
        EffectsDescription MilitaryExpenses4_2_effects_desc
        Threshold  2

    Level MilitaryExpenses4_3
        Description MilitaryExpenses4_3_desc
        EffectsDescription MilitaryExpenses4_3_effects_desc
        Threshold  3

    Level MilitaryExpenses4_4
        Description MilitaryExpenses4_4_desc
        EffectsDescription MilitaryExpenses4_4_effects_desc
        Threshold  4

    Level MilitaryExpenses4_5
        Description MilitaryExpenses4_5_desc
        EffectsDescription MilitaryExpenses4_5_effects_desc
        Threshold  5

    Level MilitaryExpenses4_6
        Description MilitaryExpenses4_6_desc
        EffectsDescription MilitaryExpenses4_6_effects_desc
        Threshold  6

    Level MilitaryExpenses4_7
        Description MilitaryExpenses4_7_desc
        EffectsDescription MilitaryExpenses4_7_effects_desc
        Threshold  7

    Level MilitaryExpenses4_8
        Description MilitaryExpenses4_8_desc
        EffectsDescription MilitaryExpenses4_8_effects_desc
        Threshold  8

    Level MilitaryExpenses4_9
        Description MilitaryExpenses4_9_desc
        EffectsDescription MilitaryExpenses4_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MilitaryExpenses4Reset
    Characters family
    AntiTraits MilitaryExpenses4

    Level MilitaryExpenses4Reset_1
        Description MilitaryExpenses4Reset_1_desc
        EffectsDescription MilitaryExpenses4Reset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait ReadyForScutage
    Characters family
    AntiTraits ReadyForScutageReset

    Level Ready_For_Scutage
        Description Ready_For_Scutage_desc
        EffectsDescription Ready_For_Scutage_effects_desc
        Threshold  1

;------------------------------------------
Trait ReadyForScutageReset
    Characters family
    AntiTraits ReadyForScutage

    Level Ready_For_Scutage_Reset
        Description Ready_For_Scutage_Reset_desc
        EffectsDescription Ready_For_Scutage_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait PardonAccepted
    Characters family
    AntiTraits PardonAcceptedReset

    Level Pardon_Accepted
        Description Pardon_Accepted_desc
        EffectsDescription Pardon_Accepted_effects_desc
        GainMessage Pardon_Accepted_gain_desc
        Threshold  1

    Level Pardon_Not_Accepted
        Description Pardon_Not_Accepted_desc
        EffectsDescription Pardon_Not_Accepted_effects_desc
        GainMessage Pardon_Not_Accepted_gain_desc
        Threshold  2

;------------------------------------------
Trait PardonAcceptedReset
    Characters family
    AntiTraits PardonAccepted

    Level Pardon_Accepted_Reset
        Description Pardon_Accepted_Reset_desc
        EffectsDescription Pardon_Accepted_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait ReinsOfPower
    Characters family
    AntiTraits ReinsOfPowerReset

    Level Weak_Grip
        Description Weak_Grip_desc
        EffectsDescription Weak_Grip_effects_desc
        GainMessage Weak_Grip_gain_desc
        Threshold  1

    Level Tight_Grip
        Description Tight_Grip_desc
        EffectsDescription Tight_Grip_effects_desc
        GainMessage Tight_Grip_gain_desc
        Threshold  2

        Effect Chivalry -2 

;------------------------------------------
Trait ReinsOfPowerReset
    Characters family
    AntiTraits ReinsOfPower

    Level Reins_of_Power_Reset
        Description Reins_of_Power_Reset_desc
        EffectsDescription Reins_of_Power_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait Hundreds
    Characters family
    AntiTraits MinusHundreds

    Level Hundreds_1
        Description Hundreds_1_desc
        EffectsDescription Hundreds_1_effects_desc
        Threshold  1

    Level Hundreds_2
        Description Hundreds_2_desc
        EffectsDescription Hundreds_2_effects_desc
        Threshold  2

    Level Hundreds_3
        Description Hundreds_3_desc
        EffectsDescription Hundreds_3_effects_desc
        Threshold  3

    Level Hundreds_4
        Description Hundreds_4_desc
        EffectsDescription Hundreds_4_effects_desc
        Threshold  4

    Level Hundreds_5
        Description Hundreds_5_desc
        EffectsDescription Hundreds_5_effects_desc
        Threshold  5

    Level Hundreds_6
        Description Hundreds_6_desc
        EffectsDescription Hundreds_6_effects_desc
        Threshold  6

    Level Hundreds_7
        Description Hundreds_7_desc
        EffectsDescription Hundreds_7_effects_desc
        Threshold  7

    Level Hundreds_8
        Description Hundreds_8_desc
        EffectsDescription Hundreds_8_effects_desc
        Threshold  8

    Level Hundreds_9
        Description Hundreds_9_desc
        EffectsDescription Hundreds_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MinusHundreds
    Characters family
    AntiTraits Hundreds

    Level MinusHundreds_1
        Description MinusHundreds_1_desc
        EffectsDescription MinusHundreds_1_effects_desc
        Threshold  1

    Level MinusHundreds_2
        Description MinusHundreds_2_desc
        EffectsDescription MinusHundreds_2_effects_desc
        Threshold  2

    Level MinusHundreds_3
        Description MinusHundreds_3_desc
        EffectsDescription MinusHundreds_3_effects_desc
        Threshold  3

    Level MinusHundreds_4
        Description MinusHundreds_4_desc
        EffectsDescription MinusHundreds_4_effects_desc
        Threshold  4

    Level MinusHundreds_5
        Description MinusHundreds_5_desc
        EffectsDescription MinusHundreds_5_effects_desc
        Threshold  5

    Level MinusHundreds_6
        Description MinusHundreds_6_desc
        EffectsDescription MinusHundreds_6_effects_desc
        Threshold  6

    Level MinusHundreds_7
        Description MinusHundreds_7_desc
        EffectsDescription MinusHundreds_7_effects_desc
        Threshold  7

    Level MinusHundreds_8
        Description MinusHundreds_8_desc
        EffectsDescription MinusHundreds_8_effects_desc
        Threshold  8

    Level MinusHundreds_9
        Description MinusHundreds_9_desc
        EffectsDescription MinusHundreds_9_effects_desc
        Threshold  9

;------------------------------------------
Trait Thousands
    Characters family
    AntiTraits MinusThousands

    Level Thousands_1
        Description Thousands_1_desc
        EffectsDescription Thousands_1_effects_desc
        Threshold  1

    Level Thousands_2
        Description Thousands_2_desc
        EffectsDescription Thousands_2_effects_desc
        Threshold  2

    Level Thousands_3
        Description Thousands_3_desc
        EffectsDescription Thousands_3_effects_desc
        Threshold  3

    Level Thousands_4
        Description Thousands_4_desc
        EffectsDescription Thousands_4_effects_desc
        Threshold  4

    Level Thousands_5
        Description Thousands_5_desc
        EffectsDescription Thousands_5_effects_desc
        Threshold  5

    Level Thousands_6
        Description Thousands_6_desc
        EffectsDescription Thousands_6_effects_desc
        Threshold  6

    Level Thousands_7
        Description Thousands_7_desc
        EffectsDescription Thousands_7_effects_desc
        Threshold  7

    Level Thousands_8
        Description Thousands_8_desc
        EffectsDescription Thousands_8_effects_desc
        Threshold  8

    Level Thousands_9
        Description Thousands_9_desc
        EffectsDescription Thousands_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MinusThousands
    Characters family
    AntiTraits Thousands

    Level MinusThousands_1
        Description MinusThousands_1_desc
        EffectsDescription MinusThousands_1_effects_desc
        Threshold  1

    Level MinusThousands_2
        Description MinusThousands_2_desc
        EffectsDescription MinusThousands_2_effects_desc
        Threshold  2

    Level MinusThousands_3
        Description MinusThousands_3_desc
        EffectsDescription MinusThousands_3_effects_desc
        Threshold  3

    Level MinusThousands_4
        Description MinusThousands_4_desc
        EffectsDescription MinusThousands_4_effects_desc
        Threshold  4

    Level MinusThousands_5
        Description MinusThousands_5_desc
        EffectsDescription MinusThousands_5_effects_desc
        Threshold  5

    Level MinusThousands_6
        Description MinusThousands_6_desc
        EffectsDescription MinusThousands_6_effects_desc
        Threshold  6

    Level MinusThousands_7
        Description MinusThousands_7_desc
        EffectsDescription MinusThousands_7_effects_desc
        Threshold  7

    Level MinusThousands_8
        Description MinusThousands_8_desc
        EffectsDescription MinusThousands_8_effects_desc
        Threshold  8

    Level MinusThousands_9
        Description MinusThousands_9_desc
        EffectsDescription MinusThousands_9_effects_desc
        Threshold  9

;------------------------------------------
Trait Encamped
    Characters family
    AntiTraits EncampedReset

    Level Encamped_1
        Description Encamped_1_desc
        EffectsDescription Encamped_1_effects_desc
        Threshold  1

;------------------------------------------
Trait EncampedReset
    Characters family
    AntiTraits Encamped

    Level Encamped_Reset
        Description Encamped_Reset_desc
        EffectsDescription Encamped_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait SupplyWagon
    Characters family
    AntiTraits SupplyWagonReset

    Level SupplyWagon_0
        Description SupplyWagon_0_desc
        EffectsDescription SupplyWagon_0_effects_desc
        Threshold  1

    Level SupplyWagon_1
        Description SupplyWagon_1_desc
        EffectsDescription SupplyWagon_1_effects_desc
        Threshold  2
        Effect MovementPoints -2 

    Level SupplyWagon_2
        Description SupplyWagon_2_desc
        EffectsDescription SupplyWagon_2_effects_desc
        Threshold  3
        Effect MovementPoints -3 

    Level SupplyWagon_3
        Description SupplyWagon_3_desc
        EffectsDescription SupplyWagon_3_effects_desc
        Threshold  4
        Effect MovementPoints -4 

    Level SupplyWagon_4
        Description SupplyWagon_4_desc
        EffectsDescription SupplyWagon_4_effects_desc
        Threshold  5
        Effect MovementPoints -5 

;------------------------------------------
Trait SupplyWagonReset
    Characters family
    AntiTraits SupplyWagon

    Level SupplyWagon_Reset
        Description SupplyWagon_Reset_desc
        EffectsDescription SupplyWagon_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait ForageIncrement
    Characters family
    AntiTraits ForageIncrementReset

    Level ForageIncrement_1
        Description ForageIncrement_1_desc
        EffectsDescription ForageIncrement_1_effects_desc
        Threshold  1

    Level ForageIncrement_2
        Description ForageIncrement_2_desc
        EffectsDescription ForageIncrement_2_effects_desc
        Threshold  2

    Level ForageIncrement_3
        Description ForageIncrement_3_desc
        EffectsDescription ForageIncrement_3_effects_desc
        Threshold  3

    Level ForageIncrement_4
        Description ForageIncrement_4_desc
        EffectsDescription ForageIncrement_4_effects_desc
        Threshold  4

    Level ForageIncrement_5
        Description ForageIncrement_5_desc
        EffectsDescription ForageIncrement_5_effects_desc
        Threshold  5

    Level ForageIncrement_6
        Description ForageIncrement_6_desc
        EffectsDescription ForageIncrement_6_effects_desc
        Threshold  6

    Level ForageIncrement_7
        Description ForageIncrement_7_desc
        EffectsDescription ForageIncrement_7_effects_desc
        Threshold  7

    Level ForageIncrement_8
        Description ForageIncrement_8_desc
        EffectsDescription ForageIncrement_8_effects_desc
        Threshold  8

;------------------------------------------
Trait ForageIncrementReset
    Characters family
    AntiTraits ForageIncrement

    Level ForageIncrement_Reset
        Description ForageIncrement_Reset_desc
        EffectsDescription ForageIncrement_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait SupplyIncrement
    Characters family
    AntiTraits SupplyIncrementReset

    Level SupplyIncrement_1
        Description SupplyIncrement_1_desc
        EffectsDescription SupplyIncrement_1_effects_desc
        Threshold  1

    Level SupplyIncrement_2
        Description SupplyIncrement_2_desc
        EffectsDescription SupplyIncrement_2_effects_desc
        Threshold  2

    Level SupplyIncrement_3
        Description SupplyIncrement_3_desc
        EffectsDescription SupplyIncrement_3_effects_desc
        Threshold  3

    Level SupplyIncrement_4
        Description SupplyIncrement_4_desc
        EffectsDescription SupplyIncrement_4_effects_desc
        Threshold  4

    Level SupplyIncrement_5
        Description SupplyIncrement_5_desc
        EffectsDescription SupplyIncrement_5_effects_desc
        Threshold  5

    Level SupplyIncrement_6
        Description SupplyIncrement_6_desc
        EffectsDescription SupplyIncrement_6_effects_desc
        Threshold  6

    Level SupplyIncrement_7
        Description SupplyIncrement_7_desc
        EffectsDescription SupplyIncrement_7_effects_desc
        Threshold  7

    Level SupplyIncrement_8
        Description SupplyIncrement_8_desc
        EffectsDescription SupplyIncrement_8_effects_desc
        Threshold  8

;------------------------------------------
Trait SupplyIncrementReset
    Characters family
    AntiTraits SupplyIncrement

    Level SupplyIncrement_Reset
        Description SupplyIncrement_Reset_desc
        EffectsDescription SupplyIncrement_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait ArmySize
    Characters family
    AntiTraits ArmySizeReset

    Level ArmySize_1
        Description ArmySize_1_desc
        EffectsDescription ArmySize_1_effects_desc
        Threshold  1

        Effect MovementPoints  1 

    Level ArmySize_2
        Description ArmySize_2_desc
        EffectsDescription ArmySize_2_effects_desc
        Threshold  2

        Effect MovementPoints  2 

    Level ArmySize_3
        Description ArmySize_3_desc
        EffectsDescription ArmySize_3_effects_desc
        Threshold  3

        Effect MovementPoints  3 

    Level ArmySize_4
        Description ArmySize_4_desc
        EffectsDescription ArmySize_4_effects_desc
        Threshold  4

        Effect MovementPoints  4 

;------------------------------------------
Trait ArmySizeReset
    Characters family
    AntiTraits ArmySize

    Level ArmySize_Reset
        Description ArmySize_Reset_desc
        EffectsDescription ArmySize_Reset_effects_desc
        Threshold  1

;------------------------------------------
Trait MercHire
    Characters family
    AntiTraits MercHireReset

    Level MercHire_1
        Description MercHire_1_desc
        EffectsDescription MercHire_1_effects_desc
        Threshold  1

    Level MercHire_2
        Description MercHire_2_desc
        EffectsDescription MercHire_2_effects_desc
        Threshold  2

    Level MercHire_3
        Description MercHire_3_desc
        EffectsDescription MercHire_3_effects_desc
        Threshold  3

    Level MercHire_4
        Description MercHire_4_desc
        EffectsDescription MercHire_4_effects_desc
        Threshold  4

    Level MercHire_5
        Description MercHire_5_desc
        EffectsDescription MercHire_5_effects_desc
        Threshold  5

    Level MercHire_6
        Description MercHire_6_desc
        EffectsDescription MercHire_6_effects_desc
        Threshold  6

    Level MercHire_7
        Description MercHire_7_desc
        EffectsDescription MercHire_7_effects_desc
        Threshold  7

    Level MercHire_8
        Description MercHire_8_desc
        EffectsDescription MercHire_8_effects_desc
        Threshold  8

    Level MercHire_9
        Description MercHire_9_desc
        EffectsDescription MercHire_9_effects_desc
        Threshold  9

;------------------------------------------
Trait MercHireReset
    Characters family
    AntiTraits MercHire

    Level MercHireReset_1
        Description MercHireReset_1_desc
        EffectsDescription MercHireReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait HumanSpy
    Characters all
    Hidden
    AntiTraits HumanSpyReset

    Level HumanSpy_1
        Description HumanSpy_1_desc
        EffectsDescription HumanSpy_1_effects_desc
        Threshold  1 

        Effect LineOfSight  -1 

    Level HumanSpy_2
        Description HumanSpy_2_desc
        EffectsDescription HumanSpy_2_effects_desc
        Threshold  2 

        Effect LineOfSight  -2 

    Level HumanSpy_3
        Description HumanSpy_3_desc
        EffectsDescription HumanSpy_3_effects_desc
        Threshold  3 

        Effect LineOfSight  -3 

    Level HumanSpy_4
        Description HumanSpy_4_desc
        EffectsDescription HumanSpy_4_effects_desc
        Threshold  4 

        Effect LineOfSight  -5 
;------------------------------------------
Trait HumanSpyReset
    Characters all
    Hidden
    AntiTraits HumanSpy

    Level HumanSpyReset_1
        Description HumanSpyReset_1_desc
        EffectsDescription HumanSpyReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait Inflation
    Characters family
;    Hidden
    AntiTraits InflationReset

    Level Inflation_1
        Description Inflation_1_desc
        EffectsDescription Inflation_1_effects_desc
;        GainMessage Inflation_1_gain_desc
;        LoseMessage Inflation_1_lose_desc
        Threshold  1 
;------------------------------------------
Trait InflationReset
    Characters family
;    Hidden
    AntiTraits Inflation

    Level InflationReset_1
        Description InflationReset_1_desc
        EffectsDescription InflationReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait Caught
    Characters family
    AntiTraits CaughtReset

    Level Caught_1
        Description Caught_1_desc
        EffectsDescription Caught_1_effects_desc
        GainMessage Caught_1_gain_desc
        Threshold  1 

    Level Caught_2
        Description Caught_2_desc
        EffectsDescription Caught_2_effects_desc
        GainMessage Caught_2_gain_desc
        Threshold  2 
;------------------------------------------
Trait CaughtReset
    Characters family
    AntiTraits Caught

    Level CaughtReset_1
        Description CaughtReset_1_desc
        EffectsDescription CaughtReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait CrusadeTimeOut
    Characters family
;    Hidden
    AntiTraits CrusadeTimeOutReset

    Level CrusadeTimeOut_1
        Description CrusadeTimeOut_1_desc
        EffectsDescription CrusadeTimeOut_1_effects_desc
        GainMessage CrusadeTimeOut_1_gain_desc
        LoseMessage CrusadeTimeOut_1_lose_desc
        Threshold  9 
;------------------------------------------
Trait CrusadeTimeOutReset
    Characters family
;    Hidden
    AntiTraits CrusadeTimeOut

    Level CrusadeTimeOutReset_1
        Description CrusadeTimeOutReset_1_desc
        EffectsDescription CrusadeTimeOutReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait TreasuryNine
    Characters family
    Hidden
    AntiTraits TNReset

    Level TreasuryNine_1
        Description TreasuryNine_1_desc
        EffectsDescription TreasuryNine_1_effects_desc
        Threshold  1

    Level TreasuryNine_2
        Description TreasuryNine_2_desc
        EffectsDescription TreasuryNine_2_effects_desc
        Threshold  2

    Level TreasuryNine_3
        Description TreasuryNine_3_desc
        EffectsDescription TreasuryNine_3_effects_desc
        Threshold  3

    Level TreasuryNine_4
        Description TreasuryNine_4_desc
        EffectsDescription TreasuryNine_4_effects_desc
        Threshold  4

    Level TreasuryNine_5
        Description TreasuryNine_5_desc
        EffectsDescription TreasuryNine_5_effects_desc
        Threshold  5

    Level TreasuryNine_6
        Description TreasuryNine_6_desc
        EffectsDescription TreasuryNine_6_effects_desc
        Threshold  6

    Level TreasuryNine_7
        Description TreasuryNine_7_desc
        EffectsDescription TreasuryNine_7_effects_desc
        Threshold  7

    Level TreasuryNine_8
        Description TreasuryNine_8_desc
        EffectsDescription TreasuryNine_8_effects_desc
        Threshold  8

    Level TreasuryNine_9
        Description TreasuryNine_9_desc
        EffectsDescription TreasuryNine_9_effects_desc
        Threshold  9

; for gens in debt paying and all gens receiving
;------------------------------------------
Trait TNReset
    Characters family
    Hidden
    AntiTraits TreasuryNine

    Level TNReset_1
        Description TNReset_1_desc
        EffectsDescription TNReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait Good
    Characters family
    AntiTraits Bad

    Level Good_1
        Description Good_1_desc
        EffectsDescription Good_1_effects_desc
        GainMessage Good_1_gain_desc
        Threshold  1
;------------------------------------------
Trait Bad
    Characters family
    AntiTraits Good

    Level Bad_1
        Description Bad_1_desc
        EffectsDescription Bad_1_effects_desc
        GainMessage Bad_1_gain_desc
        Threshold  1 
;------------------------------------------
Trait x
    Characters family
    Hidden
    AntiTraits xReset

    Level x_1
        Description x_1_desc
        EffectsDescription x_1_effects_desc
        Threshold  1

    Level x_2
        Description x_2_desc
        EffectsDescription x_2_effects_desc
        Threshold  2
;------------------------------------------
Trait xReset
    Characters family
    Hidden
    AntiTraits x

    Level xReset_1
        Description xReset_1_desc
        EffectsDescription xReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait xest
    Characters family
    Hidden
    AntiTraits xestReset

    Level xest_1
        Description xest_1_desc
        EffectsDescription xest_1_effects_desc
        Threshold  1

    Level xest_2
        Description xest_2_desc
        EffectsDescription xest_2_effects_desc
        Threshold  2
;------------------------------------------
Trait xestReset
    Characters family
    Hidden
    AntiTraits xest

    Level xestReset_1
        Description xestReset_1_desc
        EffectsDescription xestReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait SupplyIncrementCost
    Characters family
;    Hidden
    AntiTraits SupplyIncrementCostReset

    Level SupplyIncrementCost_1
        Description SupplyIncrementCost_1_desc
        EffectsDescription SupplyIncrementCost_1_effects_desc
        Threshold  1

    Level SupplyIncrementCost_2
        Description SupplyIncrementCost_2_desc
        EffectsDescription SupplyIncrementCost_2_effects_desc
        Threshold  2

    Level SupplyIncrementCost_3
        Description SupplyIncrementCost_3_desc
        EffectsDescription SupplyIncrementCost_3_effects_desc
        Threshold  3

    Level SupplyIncrementCost_4
        Description SupplyIncrementCost_4_desc
        EffectsDescription SupplyIncrementCost_4_effects_desc
        Threshold  4

    Level SupplyIncrementCost_5
        Description SupplyIncrementCost_5_desc
        EffectsDescription SupplyIncrementCost_5_effects_desc
        Threshold  5

    Level SupplyIncrementCost_6
        Description SupplyIncrementCost_6_desc
        EffectsDescription SupplyIncrementCost_6_effects_desc
        Threshold  6

    Level SupplyIncrementCost_7
        Description SupplyIncrementCost_7_desc
        EffectsDescription SupplyIncrementCost_7_effects_desc
        Threshold  7

    Level SupplyIncrementCost_8
        Description SupplyIncrementCost_8_desc
        EffectsDescription SupplyIncrementCost_8_effects_desc
        Threshold  8

;------------------------------------------
Trait SupplyIncrementCostReset
    Characters family
;    Hidden
    AntiTraits SupplyIncrementCost

    Level SupplyIncrementCostReset_1
        Description SupplyIncrementCostReset_1_desc
        EffectsDescription SupplyIncrementCostReset_1_effects_desc
        Threshold  1

;------------------------------------------
Trait Starving
    Characters family
;    Hidden
    AntiTraits StarvingReset

    Level Starving_1
        Description Starving_1_desc
        EffectsDescription Starving_1_effects_desc
        GainMessage Starving_1_gain_desc
        Threshold  1

        Effect Command -2 
        Effect TroopMorale  -4 
        Effect Loyalty -2 
        Effect MovementPoints -4
        Effect BribeResistance -5 
;------------------------------------------
Trait StarvingReset
    Characters family
;    Hidden
    AntiTraits Starving

    Level StarvingReset_1
        Description StarvingReset_1_desc
        EffectsDescription StarvingReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait PardonAvailable
    Characters family
;    Hidden

    Level PardonAvailable_1
        Description PardonAvailable_1_desc
        EffectsDescription PardonAvailable_1_effects_desc
        GainMessage PardonAvailable_1_gain_desc
        Threshold  1
;------------------------------------------
Trait Move
    Characters family
;    Hidden
    AntiTraits MoveReset

    Level Move_1
        Description Move_1_desc
        EffectsDescription Move_1_effects_desc
        Threshold  1

        Effect MovementPoints -1
;------------------------------------------
Trait MoveReset
    Characters family
;    Hidden
    AntiTraits Move

    Level MoveReset_1
        Description MoveReset_1_desc
        EffectsDescription MoveReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait Spare
    Characters family
    Hidden
    AntiTraits SpareReset

    Level Spare_1
        Description Spare_1_desc
        EffectsDescription Spare_1_effects_desc
        Threshold  1
;------------------------------------------
Trait SpareReset
    Characters family
    Hidden
    AntiTraits Spare

    Level SpareReset_1
        Description SpareReset_1_desc
        EffectsDescription SpareReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait SpareTwo
    Characters family
;    Hidden
    AntiTraits SpareTwoReset

    Level SpareTwo_1
        Description SpareTwo_1_desc
        EffectsDescription SpareTwo_1_effects_desc
        Threshold  1
;------------------------------------------
Trait SpareTwoReset
    Characters family
;    Hidden
    AntiTraits SpareTwo

    Level SpareTwoReset_1
        Description SpareTwoReset_1_desc
        EffectsDescription SpareTwoReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait JrWarCouncillor
    Characters family
;    Hidden
    AntiTraits JrWarCouncillorReset

    Level JrWarCouncillor_1
        Description JrWarCouncillor_1_desc
        EffectsDescription JrWarCouncillor_1_effects_desc
        GainMessage JrWarCouncillor_1_gain_desc
        Threshold  1

    Level JrWarCouncillor_2
        Description JrWarCouncillor_2_desc
        EffectsDescription JrWarCouncillor_2_effects_desc
        GainMessage JrWarCouncillor_2_gain_desc
        Threshold  2
;------------------------------------------
Trait JrWarCouncillorReset
    Characters family
;    Hidden
    AntiTraits JrWarCouncillor

    Level JrWarCouncillorReset_1
        Description JrWarCouncillorReset_1_desc
        EffectsDescription JrWarCouncillorReset_1_effects_desc
        Threshold  1 
;------------------------------------------
Trait RecruitLimit
    Characters family
;    Hidden
    AntiTraits RecruitLimitReset

    Level RecruitLimit_1
        Description RecruitLimit_1_desc
        EffectsDescription RecruitLimit_1_effects_desc
        GainMessage RecruitLimit_1_gain_desc
        Threshold  1
        Effect Charm 5

    Level RecruitLimit_2
        Description RecruitLimit_2_desc
        EffectsDescription RecruitLimit_2_effects_desc
        Threshold  2
        Effect Charm 5

    Level RecruitLimit_3
        Description RecruitLimit_3_desc
        EffectsDescription RecruitLimit_3_effects_desc
        Threshold  3
        Effect Charm 5

    Level RecruitLimit_4
        Description RecruitLimit_4_desc
        EffectsDescription RecruitLimit_4_effects_desc
        Threshold  4
        Effect Charm 5

    Level RecruitLimit_5
        Description RecruitLimit_5_desc
        EffectsDescription RecruitLimit_5_effects_desc
        Threshold  5
        Effect Charm 5

    Level RecruitLimit_6
        Description RecruitLimit_6_desc
        EffectsDescription RecruitLimit_6_effects_desc
        Threshold  6
        Effect Charm 5

    Level RecruitLimit_7
        Description RecruitLimit_7_desc
        EffectsDescription RecruitLimit_7_effects_desc
        Threshold  7
        Effect Charm 5

    Level RecruitLimit_8
        Description RecruitLimit_8_desc
        EffectsDescription RecruitLimit_8_effects_desc
        Threshold  8
        Effect Charm 5
;------------------------------------------
Trait RecruitLimitReset
    Characters family
;    Hidden
    AntiTraits RecruitLimit

    Level RecruitLimitReset_1
        Description RecruitLimitReset_1_desc
        EffectsDescription RecruitLimitReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait WCT
    Characters family
;    Hidden
    AntiTraits WCTReset

    Level WCT_1
        Description WCT_1_desc
        EffectsDescription WCT_1_effects_desc
        Threshold  1

    Level WCT_2
        Description WCT_2_desc
        EffectsDescription WCT_2_effects_desc
        Threshold  2

    Level WCT_3
        Description WCT_3_desc
        EffectsDescription WCT_3_effects_desc
        Threshold  3

    Level WCT_4
        Description WCT_4_desc
        EffectsDescription WCT_4_effects_desc
        Threshold  4

    Level WCT_5
        Description WCT_5_desc
        EffectsDescription WCT_5_effects_desc
        Threshold  5

    Level WCT_6
        Description WCT_6_desc
        EffectsDescription WCT_6_effects_desc
        Threshold  6

;------------------------------------------
Trait WCTReset
    Characters family
;    Hidden
    AntiTraits WCT

    Level WCTReset_1
        Description WCTReset_1_desc
        EffectsDescription WCTReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait WCP
    Characters family
;    Hidden
    AntiTraits WCPReset

    Level WCP_1
        Description WCP_1_desc
        EffectsDescription WCP_1_effects_desc
        Threshold  1
;------------------------------------------
Trait WCPReset
    Characters family
;    Hidden
    AntiTraits WCP

    Level WCPReset_1
        Description WCPReset_1_desc
        EffectsDescription WCPReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait JrWCOff
    Characters family
    Hidden
    AntiTraits JrWCOffReset

    Level JrWCOff_1
        Description JrWCOff_1_desc
        EffectsDescription JrWCOff_1_effects_desc
        Threshold  1
        Effect Charm -5
;------------------------------------------
Trait JrWCOffReset
    Characters family
    Hidden
    AntiTraits JrWCOff

    Level JrWCOffReset_1
        Description JrWCOffReset_1_desc
        EffectsDescription JrWCOffReset_1_effects_desc
        Threshold  1
;------------------------------------------
Trait RecruitedUnit
    Characters family
    Hidden
    AntiTraits RecruitedUnitReset

    Level RecruitedUnit_1
        Description RecruitedUnit_1_desc
        EffectsDescription RecruitedUnit_1_effects_desc
        Threshold  1
;------------------------------------------
Trait RecruitedUnitReset
    Characters family
    Hidden
    AntiTraits RecruitedUnit

    Level RecruitedUnitReset_1
        Description RecruitedUnitReset_1_desc
        EffectsDescription RecruitedUnitReset_1_effects_desc
        Threshold  1
;------------------------------------------
;===============================================================
;== SS TRIGGERs START HERE ==
;===============================================================
;------------------------------------------
Trigger priestinit13
    WhenToTest AgentCreated

    Condition AgentType = priest
          and CharacterReligion pagan
          and FactionType lithuania

    Affects PaganPriest  1  Chance  100 

;------------------------------------------
Trigger priestinit14
    WhenToTest AgentCreated

    Condition AgentType = priest
          and CharacterReligion pagan
          and SettlementBuildingExists = dievas_temple
          and FactionType lithuania

    Affects PaganPriest  2  Chance  100 

;------------------------------------------
Trigger priestinit15
    WhenToTest AgentCreated

    Condition AgentType = priest
          and CharacterReligion pagan
          and SettlementBuildingExists = perkunas_temple
          and FactionType lithuania

    Affects PaganPriest  2  Chance  100 

;------------------------------------------
Trigger priestinit16
    WhenToTest AgentCreated

    Condition AgentType = priest
          and CharacterReligion pagan
          and SettlementBuildingExists = giltine_temple
          and FactionType lithuania

    Affects PaganPriest  2  Chance  100 

;------------------------------------------
Trigger priestinit17
    WhenToTest AgentCreated

    Condition AgentType = priest
          and CharacterReligion pagan
          and FactionType cumans

    Affects PaganPriest  1  Chance  100 

;------------------------------------------
Trigger priestinit18
    WhenToTest AgentCreated

    Condition AgentType = priest
          and CharacterReligion pagan
          and SettlementBuildingExists = tengir_temple
          and FactionType cumans

    Affects PaganPriest  2  Chance  100 

;------------------------------------------
Trigger priestinit19
    WhenToTest AgentCreated

    Condition AgentType = priest
          and not FactionIsLocal

    Affects UnorthodoxyBonus  1  Chance  100 

;===============================================================

;*********  !!!!!!!!!!!!!!!!!!!!!!!!!!!! *********
;*********  START OF BBB TRAIT TRIGGERS  *********
;*********  !!!!!!!!!!!!!!!!!!!!!!!!!!!! *********
;*********  BLOODLINES TRIGGERS - ROYAL DYNASTIES  *********

;------------------------------------------
Trigger Royal_Founder_FactionLeader
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
        and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
        and I_TurnNumber = 0

    Affects Royal_Founder  1  Chance  100

;------------------------------------------
Trigger BiologicalSonRoyalFounder
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and I_TurnNumber = 0
          
    Affects BiologicalSon  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_English_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_English > 0

    Affects Royal_Blood_English  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_English_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsEnglish = 1
          and FatherTrait Royal_Blood_English = 0
	      and FactionType england

    Affects Royal_Blood_English  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_English_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_English > 0

    Affects Royal_Relation_English  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_English_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsEnglish = 1
          and FatherTrait Royal_Blood_English = 0
	      and not FactionType england

    Affects Royal_Relation_English  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_English_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_English > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_English  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_English_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsEnglish = 1
          and FatherTrait Royal_Blood_English = 0
	      and FactionType england
          and AgentType = princess

    Affects Princess_Royal_Blood_English  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_French_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_French > 0

    Affects Royal_Blood_French  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_French_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsFrench = 1
          and FatherTrait Royal_Blood_French = 0
	      and FactionType france

    Affects Royal_Blood_French  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_French_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_French > 0

    Affects Royal_Relation_French  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_French_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsFrench = 1
          and FatherTrait Royal_Blood_French = 0
	      and not FactionType france

    Affects Royal_Relation_French  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_French_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_French > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_French  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_French_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsFrench = 1
          and FatherTrait Royal_Blood_French = 0
	      and FactionType france
          and AgentType = princess

    Affects Princess_Royal_Blood_French  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_HRE_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_HRE > 0

    Affects Royal_Blood_HRE  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_HRE_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHRE = 1
          and FatherTrait Royal_Blood_HRE = 0
	      and FactionType HRE

    Affects Royal_Blood_HRE  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_HRE_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_HRE > 0

    Affects Royal_Relation_HRE  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_HRE_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHRE = 1
          and FatherTrait Royal_Blood_HRE = 0
	      and not FactionType HRE

    Affects Royal_Relation_HRE  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_HRE_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_HRE > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_HRE  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_HRE_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHRE = 1
          and FatherTrait Royal_Blood_HRE = 0
	      and FactionType HRE
          and AgentType = princess

    Affects Princess_Royal_Blood_HRE  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Spanish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Spanish > 0

    Affects Royal_Blood_Spanish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Spanish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSpanish = 1
          and FatherTrait Royal_Blood_Spanish = 0
	      and FactionType spain

    Affects Royal_Blood_Spanish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Spanish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Spanish > 0

    Affects Royal_Relation_Spanish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Spanish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSpanish = 1
          and FatherTrait Royal_Blood_Spanish = 0
	      and not FactionType spain

    Affects Royal_Relation_Spanish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Spanish_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Spanish > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Spanish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Spanish_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSpanish = 1
          and FatherTrait Royal_Blood_Spanish = 0
	      and FactionType spain
          and AgentType = princess

    Affects Princess_Royal_Blood_Spanish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Sicilian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Sicilian > 0

    Affects Royal_Blood_Sicilian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Sicilian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSicilian = 1
          and FatherTrait Royal_Blood_Sicilian = 0
	      and FactionType sicily

    Affects Royal_Blood_Sicilian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Sicilian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Sicilian > 0

    Affects Royal_Relation_Sicilian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Sicilian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSicilian = 1
          and FatherTrait Royal_Blood_Sicilian = 0
	      and not FactionType sicily

    Affects Royal_Relation_Sicilian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Sicilian_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Sicilian > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Sicilian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Sicilian_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSicilian = 1
          and FatherTrait Royal_Blood_Sicilian = 0
	      and FactionType sicily
          and AgentType = princess

    Affects Princess_Royal_Blood_Sicilian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Venetian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Venetian > 0

    Affects Royal_Blood_Venetian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Venetian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsVenetian = 1
          and FatherTrait Royal_Blood_Venetian = 0
	      and FactionType venice

    Affects Royal_Blood_Venetian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Venetian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Venetian > 0

    Affects Royal_Relation_Venetian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Venetian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsVenetian = 1
          and FatherTrait Royal_Blood_Venetian = 0
	      and not FactionType venice

    Affects Royal_Relation_Venetian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Venetian_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Venetian > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Venetian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Venetian_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsVenetian = 1
          and FatherTrait Royal_Blood_Venetian = 0
	      and FactionType venice
          and AgentType = princess

    Affects Princess_Royal_Blood_Venetian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Milanese_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Milanese > 0

    Affects Royal_Blood_Milanese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Milanese_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsMilanese = 1
          and FatherTrait Royal_Blood_Milanese = 0
	      and FactionType milan

    Affects Royal_Blood_Milanese  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Milanese_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Milanese > 0

    Affects Royal_Relation_Milanese  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Milanese_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsMilanese = 1
          and FatherTrait Royal_Blood_Milanese = 0
	      and not FactionType milan

    Affects Royal_Relation_Milanese  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Milanese_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Milanese > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Milanese  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Milanese_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsMilanese = 1
          and FatherTrait Royal_Blood_Milanese = 0
	      and FactionType milan
          and AgentType = princess

    Affects Princess_Royal_Blood_Milanese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Scottish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Scottish > 0

    Affects Royal_Blood_Scottish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Scottish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsScottish = 1
          and FatherTrait Royal_Blood_Scottish = 0
	      and FactionType scotland

    Affects Royal_Blood_Scottish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Scottish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Scottish > 0

    Affects Royal_Relation_Scottish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Scottish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsScottish = 1
          and FatherTrait Royal_Blood_Scottish = 0
	      and not FactionType scotland

    Affects Royal_Relation_Scottish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Scottish_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Scottish > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Scottish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Scottish_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsScottish = 1
          and FatherTrait Royal_Blood_Scottish = 0
	      and FactionType scotland
          and AgentType = princess

    Affects Princess_Royal_Blood_Scottish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Greek_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Greek > 0

    Affects Royal_Blood_Greek  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Greek_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsGreek = 1
          and FatherTrait Royal_Blood_Greek = 0
	      and FactionType byzantium

    Affects Royal_Blood_Greek  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Greek_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Greek > 0

    Affects Royal_Relation_Greek  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Greek_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsGreek = 1
          and FatherTrait Royal_Blood_Greek = 0
	      and not FactionType byzantium

    Affects Royal_Relation_Greek  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Greek_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Greek > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Greek  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Greek_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsGreek = 1
          and FatherTrait Royal_Blood_Greek = 0
	      and FactionType byzantium
          and AgentType = princess

    Affects Princess_Royal_Blood_Greek  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Russian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Russian > 0

    Affects Royal_Blood_Russian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Russian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsRussian = 1
          and FatherTrait Royal_Blood_Russian = 0
	      and FactionType russia

    Affects Royal_Blood_Russian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Russian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Russian > 0

    Affects Royal_Relation_Russian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Russian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsRussian = 1
          and FatherTrait Royal_Blood_Russian = 0
	      and not FactionType russia

    Affects Royal_Relation_Russian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Russian_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Russian > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Russian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Russian_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsRussian = 1
          and FatherTrait Royal_Blood_Russian = 0
	      and FactionType russia
          and AgentType = princess

    Affects Princess_Royal_Blood_Russian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Moorish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Moorish > 0

    Affects Royal_Blood_Moorish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Turkish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Turkish > 0

    Affects Royal_Blood_Turkish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Egyptian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Egyptian > 0

    Affects Royal_Blood_Egyptian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Danish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Danish > 0

    Affects Royal_Blood_Danish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Danish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsDanish = 1
          and FatherTrait Royal_Blood_Danish = 0
	      and FactionType denmark

    Affects Royal_Blood_Danish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Danish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Danish > 0

    Affects Royal_Relation_Danish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Danish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsDanish = 1
          and FatherTrait Royal_Blood_Danish = 0
	      and not FactionType denmark

    Affects Royal_Relation_Danish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Danish_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Danish > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Danish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Danish_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsDanish = 1
          and FatherTrait Royal_Blood_Danish = 0
	      and FactionType denmark
          and AgentType = princess

    Affects Princess_Royal_Blood_Danish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Portuguese_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Portuguese > 0

    Affects Royal_Blood_Portuguese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Portuguese_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsPortuguese = 1
          and FatherTrait Royal_Blood_Portuguese = 0
	      and FactionType portugal

    Affects Royal_Blood_Portuguese  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Portuguese_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Portuguese > 0

    Affects Royal_Relation_Portuguese  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Portuguese_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsPortuguese = 1
          and FatherTrait Royal_Blood_Portuguese = 0
	      and not FactionType portugal

    Affects Royal_Relation_Portuguese  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Portuguese_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Portuguese > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Portuguese  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Portuguese_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsPortuguese = 1
          and FatherTrait Royal_Blood_Portuguese = 0
	      and FactionType portugal
          and AgentType = princess

    Affects Princess_Royal_Blood_Portuguese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Polish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Polish > 0

    Affects Royal_Blood_Polish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Polish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsPolish = 1
          and FatherTrait Royal_Blood_Polish = 0
	      and FactionType poland

    Affects Royal_Blood_Polish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Polish_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Polish > 0

    Affects Royal_Relation_Polish  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Polish_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsPolish = 1
          and FatherTrait Royal_Blood_Polish = 0
	      and not FactionType poland

    Affects Royal_Relation_Polish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Polish_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Polish > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Polish  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Polish_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsPolish = 1
          and FatherTrait Royal_Blood_Polish = 0
	      and FactionType poland
          and AgentType = princess

    Affects Princess_Royal_Blood_Polish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Hungarian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Hungarian > 0

    Affects Royal_Blood_Hungarian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Hungarian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHungarian = 1
          and FatherTrait Royal_Blood_Hungarian = 0
	      and FactionType hungary

    Affects Royal_Blood_Hungarian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Hungarian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Hungarian > 0

    Affects Royal_Relation_Hungarian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Hungarian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHungarian = 1
          and FatherTrait Royal_Blood_Hungarian = 0
	      and not FactionType hungary

    Affects Royal_Relation_Hungarian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Hungarian_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Hungarian > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Hungarian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Hungarian_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHungarian = 1
          and FatherTrait Royal_Blood_Hungarian = 0
	      and FactionType hungary
          and AgentType = princess

    Affects Princess_Royal_Blood_Hungarian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Aragonese_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Aragonese > 0

    Affects Royal_Blood_Aragonese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Aragonese_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsAragonese = 1
          and FatherTrait Royal_Blood_Aragonese = 0
	      and FactionType aragon

    Affects Royal_Blood_Aragonese  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Aragonese_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Aragonese > 0

    Affects Royal_Relation_Aragonese  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Aragonese_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsAragonese = 1
          and FatherTrait Royal_Blood_Aragonese = 0
	      and not FactionType aragon

    Affects Royal_Relation_Aragonese  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Aragonese_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Aragonese > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Aragonese  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Aragonese_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsAragonese = 1
          and FatherTrait Royal_Blood_Aragonese = 0
	      and FactionType aragon
          and AgentType = princess

    Affects Princess_Royal_Blood_Aragonese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Jerusalem_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Jerusalem > 0

    Affects Royal_Blood_Jerusalem  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Jerusalem_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsJerusalem = 1
          and FatherTrait Royal_Blood_Jerusalem = 0
	      and FactionType jerusalem

    Affects Royal_Blood_Jerusalem  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Jerusalem_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsJerusalem = 1
          and FatherTrait Royal_Blood_Jerusalem = 0
	      and not FactionType jerusalem

    Affects Royal_Relation_Jerusalem  1  Chance  100

;------------------------------------------
Trigger Royal_Relation2_Jerusalem_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Jerusalem > 0

    Affects Royal_Relation_Jerusalem  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Jerusalem_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Jerusalem > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Jerusalem  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Jerusalem_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsJerusalem = 1
          and FatherTrait Royal_Blood_Jerusalem = 0
	      and FactionType jerusalem
          and AgentType = princess

    Affects Princess_Royal_Blood_Jerusalem  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Lithuanian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Lithuanian > 0

    Affects Royal_Blood_Lithuanian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Lithuanian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsLithuanian = 1
          and FatherTrait Royal_Blood_Lithuanian = 0
	      and FactionType lithuania

    Affects Royal_Blood_Lithuanian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Lithuanian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Lithuanian > 0

    Affects Royal_Relation_Lithuanian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Lithuanian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsLithuanian = 1
          and FatherTrait Royal_Blood_Lithuanian = 0
	      and not FactionType lithuania

    Affects Royal_Relation_Lithuanian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Lithuanian_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Lithuanian > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Lithuanian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Lithuanian_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsLithuanian = 1
          and FatherTrait Royal_Blood_Lithuanian = 0
	      and FactionType lithuania
          and AgentType = princess

    Affects Princess_Royal_Blood_Lithuanian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Timurids_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Timurids > 0

    Affects Royal_Blood_Timurids  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Timurids_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsTimurids = 1
          and FatherTrait Royal_Blood_Timurids = 0
	      and FactionType timurids

    Affects Royal_Blood_Timurids  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Timurids_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Timurids > 0

    Affects Royal_Relation_Timurids  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Timurids_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsTimurids = 1
          and FatherTrait Royal_Blood_Timurids = 0
	      and not FactionType timurids

    Affects Royal_Relation_Timurids  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Timurids_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Timurids > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Timurids  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Timurids_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsTimurids = 1
          and FatherTrait Royal_Blood_Timurids = 0
	      and FactionType timurids
          and AgentType = princess

    Affects Princess_Royal_Blood_Timurids  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Norwegian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Norwegian > 0

    Affects Royal_Blood_Norwegian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Norwegian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsNorwegian = 1
          and FatherTrait Royal_Blood_Norwegian = 0
	      and FactionType norway

    Affects Royal_Blood_Norwegian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Norwegian_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Norwegian > 0

    Affects Royal_Relation_Norwegian  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Norwegian_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsNorwegian = 1
          and FatherTrait Royal_Blood_Norwegian = 0
	      and not FactionType norway

    Affects Royal_Relation_Norwegian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Norwegian_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Norwegian > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Norwegian  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Norwegian_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsNorwegian = 1
          and FatherTrait Royal_Blood_Norwegian = 0
	      and FactionType norway
          and AgentType = princess

    Affects Princess_Royal_Blood_Norwegian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Kievan_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Kievan > 0

    Affects Royal_Blood_Kievan  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Kievan_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsKievan = 1
          and FatherTrait Royal_Blood_Kievan = 0
	      and FactionType kievan_rus

    Affects Royal_Blood_Kievan  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Kievan_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Relation_Kievan > 0

    Affects Royal_Relation_Kievan  1  Chance  100

;------------------------------------------
Trigger Royal_Relation_Kievan_CharacterComesOfAge_Mother
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsKievan = 1
          and FatherTrait Royal_Blood_Kievan = 0
	      and not FactionType kievan_rus

    Affects Royal_Relation_Kievan  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Kievan_CharacterComesOfAge
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Kievan > 0
          and AgentType = princess

    Affects Princess_Royal_Blood_Kievan  1  Chance  100

;------------------------------------------
Trigger princess_Royal_Blood_Kievan_CharacterComesOfAge2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsKievan = 1
          and FatherTrait Royal_Blood_Kievan = 0
	      and FactionType kievan_rus
          and AgentType = princess

    Affects Princess_Royal_Blood_Kievan  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Cumans_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Cumans > 0

    Affects Royal_Blood_Cumans  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Kwarezm_CharacterComesOfAge_Father
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Royal_Blood_Kwarezm > 0

    Affects Royal_Blood_Kwarezm  1  Chance  100


;------------------------------------------
Trigger Royal_Blood_English_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType england
          and Trait Royal_Blood_English = 0
          and OriginalFactionType england
          and Trait BiologicalSon > 0

    Affects Royal_Blood_English  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_English_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
        and AgentType = princess
        and FactionType england
        and Trait Princess_Royal_Blood_English = 0
       
    Affects Princess_Royal_Blood_English  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_French_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
        and FactionType france
	and Trait Royal_Blood_French = 0
	and OriginalFactionType france
	and Trait BiologicalSon > 0
          
    Affects Royal_Blood_French  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_French_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
        and AgentType = princess
        and FactionType france
        and Trait Princess_Royal_Blood_French = 0
       
    Affects Princess_Royal_Blood_French  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_HRE_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
        and FactionType hre
	and Trait Royal_Blood_HRE = 0
	and OriginalFactionType hre
	and Trait BiologicalSon > 0

    Affects Royal_Blood_HRE  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_HRE_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType HRE
          and Trait Princess_Royal_Blood_HRE = 0
       
    Affects Princess_Royal_Blood_HRE  1  Chance  100 

;------------------------------------------
Trigger Royal_Blood_Spanish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType spain
    and Trait Royal_Blood_Spanish = 0
    and OriginalFactionType spain
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Spanish  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Spanish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType spain
          and Trait Princess_Royal_Blood_Spanish = 0
       
    Affects Princess_Royal_Blood_Spanish  1  Chance  100  

;------------------------------------------
Trigger Royal_Blood_Sicilian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType sicily
    and Trait Royal_Blood_Sicilian = 0
    and OriginalFactionType sicily
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Sicilian  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Sicilian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType sicily
          and Trait Princess_Royal_Blood_Sicilian = 0
       
    Affects Princess_Royal_Blood_Sicilian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Venetian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType venice
    and Trait Royal_Blood_Venetian = 0
    and OriginalFactionType venice
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Venetian  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Venetian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType venice
          and Trait Princess_Royal_Blood_Venetian = 0
       
    Affects Princess_Royal_Blood_Venetian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Milanese_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType milan
    and Trait Royal_Blood_Milanese = 0
    and OriginalFactionType milan
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Milanese  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Milanese_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType milan
          and Trait Princess_Royal_Blood_Milanese = 0
       
    Affects Princess_Royal_Blood_Milanese  1  Chance  100  

;------------------------------------------
Trigger Royal_Blood_Scottish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType scotland
    and Trait Royal_Blood_Scottish = 0
    and OriginalFactionType scotland
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Scottish  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Scottish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType scotland
          and Trait Princess_Royal_Blood_Scottish = 0
       
    Affects Princess_Royal_Blood_Scottish  1  Chance  100
     
;------------------------------------------
Trigger Royal_Blood_Greek_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType byzantium
    and Trait Royal_Blood_Greek = 0
    and OriginalFactionType byzantium
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Greek  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Greek_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType byzantium
          and Trait Princess_Royal_Blood_Greek = 0
       
    Affects Princess_Royal_Blood_Greek  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Russian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType russia
    and Trait Royal_Blood_Russian = 0
    and OriginalFactionType russia
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Russian  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Russian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType russia
          and Trait Princess_Royal_Blood_Russian = 0
       
    Affects Princess_Royal_Blood_Russian  1  Chance  100    
    
;------------------------------------------
Trigger Royal_Blood_Moorish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType moors
    and Trait Royal_Blood_Moorish = 0
    and OriginalFactionType moors
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Moorish  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Moorish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType moors
          and Trait Princess_Royal_Blood_Moorish = 0
       
    Affects Princess_Royal_Blood_Moorish  1  Chance  100   

;------------------------------------------
Trigger Royal_Blood_Turkish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType turks
    and Trait Royal_Blood_Turkish = 0
    and OriginalFactionType turks
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Turkish  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Turkish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType turks
          and Trait Princess_Royal_Blood_Turkish = 0
       
    Affects Princess_Royal_Blood_Turkish  1  Chance  100
       
;------------------------------------------
Trigger Royal_Blood_Egyptian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType egypt
    and Trait Royal_Blood_Egyptian = 0
    and OriginalFactionType egypt
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Egyptian  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Egyptian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType egypt
          and Trait Princess_Royal_Blood_Egyptian = 0
       
    Affects Princess_Royal_Blood_Egyptian  1  Chance  100  

;------------------------------------------
Trigger Royal_Blood_Danish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType denmark
    and Trait Royal_Blood_Danish = 0
    and OriginalFactionType denmark
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Danish  1  Chance  100   

;------------------------------------------
Trigger Princess_Royal_Blood_Danish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType denmark
          and Trait Princess_Royal_Blood_Danish = 0
       
    Affects Princess_Royal_Blood_Danish  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Portuguese_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType portugal
    and Trait Royal_Blood_Portuguese = 0
    and OriginalFactionType portugal
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Portuguese  1  Chance  100   

;------------------------------------------
Trigger Princess_Royal_Blood_Portuguese_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType portugal
          and Trait Princess_Royal_Blood_Portuguese = 0
       
    Affects Princess_Royal_Blood_Portuguese  1  Chance  100    
    
;------------------------------------------
Trigger Royal_Blood_Polish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType poland
    and Trait Royal_Blood_Polish = 0
    and OriginalFactionType poland
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Polish  1  Chance  100    

;------------------------------------------
Trigger Princess_Royal_Blood_Polish_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType poland
          and Trait Princess_Royal_Blood_Polish = 0
       
    Affects Princess_Royal_Blood_Polish  1  Chance  100       

;------------------------------------------
Trigger Royal_Blood_Hungarian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType hungary
    and Trait Royal_Blood_Hungarian = 0
    and OriginalFactionType hungary
    and Trait BiologicalSon > 0
          
    Affects Royal_Blood_Hungarian  1  Chance  100   

;------------------------------------------
Trigger Princess_Royal_Blood_Hungarian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType hungary
          and Trait Princess_Royal_Blood_Hungarian = 0
       
    Affects Princess_Royal_Blood_Hungarian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Aragonese_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType aragon
    and Trait Royal_Blood_Aragonese = 0
    and OriginalFactionType aragon
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Aragonese  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Aragonese_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType aragon
          and Trait Princess_Royal_Blood_Aragonese = 0
       
    Affects Princess_Royal_Blood_Aragonese  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Jerusalem_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType jerusalem
    and Trait Royal_Blood_Jerusalem = 0
    and OriginalFactionType jerusalem
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Jerusalem  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Jerusalem_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType jerusalem
          and Trait Princess_Royal_Blood_Jerusalem = 0
       
    Affects Princess_Royal_Blood_Jerusalem  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Lithuanian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType lithuania 
    and Trait Royal_Blood_Lithuanian = 0
    and OriginalFactionType lithuania
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Lithuanian  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Lithuanian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType lithuania 
          and Trait Princess_Royal_Blood_Lithuanian = 0
       
    Affects Princess_Royal_Blood_Lithuanian  1  Chance  100
;------------------------------------------
Trigger Royal_Blood_Timurids_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType timurids
    and Trait Royal_Blood_Timurids = 0
    and OriginalFactionType timurids
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Timurids  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Timurids_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType timurids
          and Trait Princess_Royal_Blood_Timurids = 0
       
    Affects Princess_Royal_Blood_Timurids  1  Chance  100
;------------------------------------------
Trigger Royal_Blood_Norwegian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType norway
    and Trait Royal_Blood_Norwegian = 0
    and OriginalFactionType norway
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Norwegian  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Norwegian_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType norway
          and Trait Princess_Royal_Blood_Norwegian = 0
       
    Affects Princess_Royal_Blood_Norwegian  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Kievan_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType kievan_rus
    and Trait Royal_Blood_Kievan = 0
    and OriginalFactionType kievan_rus
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Kievan  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Kievan_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType kievan_rus
          and Trait Princess_Royal_Blood_Kievan = 0
       
    Affects Princess_Royal_Blood_Kievan  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Cumans_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType cumans
    and Trait Royal_Blood_Cumans = 0
    and OriginalFactionType cumans
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Cumans  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Cumans_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType cumans
          and Trait Princess_Royal_Blood_Cumans = 0
       
    Affects Princess_Royal_Blood_Cumans  1  Chance  100

;------------------------------------------
Trigger Royal_Blood_Kwarezm_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and FactionType kwarezm
    and Trait Royal_Blood_Kwarezm = 0
    and OriginalFactionType kwarezm
    and Trait BiologicalSon > 0

    Affects Royal_Blood_Kwarezm  1  Chance  100

;------------------------------------------
Trigger Princess_Royal_Blood_Kwarezm_FactionHeir
    WhenToTest CharacterTurnStart

    Condition FatherTrait Royal_Founder > 0
          and AgentType = princess
          and FactionType kwarezm
          and Trait Princess_Royal_Blood_Kwarezm = 0
       
    Affects Princess_Royal_Blood_Kwarezm  1  Chance  100

;------------------------------------------
;bastard sons have no connection to their father's wife
Trigger cleanup_relation_english
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_English > 0
    and FatherTrait Royal_Relation_English = 0

    Affects Royal_Relation_English  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_french   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_French > 0
    and FatherTrait Royal_Relation_French = 0

    Affects Royal_Relation_French  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_hre   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_HRE > 0
    and FatherTrait Royal_Relation_HRE = 0

    Affects Royal_Relation_HRE  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_spain   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Spanish > 0
    and FatherTrait Royal_Relation_Spanish = 0

    Affects Royal_Relation_Spanish  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_sicilian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Sicilian > 0
    and FatherTrait Royal_Relation_Sicilian = 0

    Affects Royal_Relation_Sicilian  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_venetian  
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Venetian > 0
    and FatherTrait Royal_Relation_Venetian = 0

    Affects Royal_Relation_Venetian  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_milanese  
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Milanese > 0
    and FatherTrait Royal_Relation_Milanese = 0

    Affects Royal_Relation_Milanese  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_scottish   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Scottish > 0
    and FatherTrait Royal_Relation_Scottish = 0

    Affects Royal_Relation_Scottish  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_greek   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Greek > 0
    and FatherTrait Royal_Relation_Greek = 0

    Affects Royal_Relation_Greek  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_russian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Russian > 0
    and FatherTrait Royal_Relation_Russian = 0

    Affects Royal_Relation_Russian  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_egyptian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Egyptian > 0
    and FatherTrait Royal_Relation_Egyptian = 0

    Affects Royal_Relation_Egyptian  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_turkish   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Turkish > 0
    and FatherTrait Royal_Relation_Turkish = 0

    Affects Royal_Relation_Turkish  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_moorish   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Moorish > 0
    and FatherTrait Royal_Relation_Moorish = 0

    Affects Royal_Relation_Moorish  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_danish   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Danish > 0
    and FatherTrait Royal_Relation_Danish = 0

    Affects Royal_Relation_Danish  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_portuguese   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Portuguese > 0
    and FatherTrait Royal_Relation_Portuguese = 0

    Affects Royal_Relation_Portuguese  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_polish   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Polish > 0
    and FatherTrait Royal_Relation_Polish = 0

    Affects Royal_Relation_Polish  -1  Chance 100

;------------------------------------------
Trigger cleanup_relation_hungarian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Hungarian > 0
    and FatherTrait Royal_Relation_Hungarian = 0

    Affects Royal_Relation_Hungarian  -1  Chance 100
;------------------------------------------
Trigger cleanup_relation_Aragonese   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Aragonese > 0
    and FatherTrait Royal_Relation_Aragonese = 0

    Affects Royal_Relation_Aragonese  -1  Chance 100
;------------------------------------------
Trigger cleanup_relation_Lithuanian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Lithuanian > 0
    and FatherTrait Royal_Relation_Lithuanian = 0

    Affects Royal_Relation_Lithuanian  -1  Chance 100
;------------------------------------------
Trigger cleanup_relation_Timurids   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Timurids > 0
    and FatherTrait Royal_Relation_Timurids = 0

    Affects Royal_Relation_Timurids  -1  Chance 100
;------------------------------------------
Trigger cleanup_relation_Norwegian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Norwegian > 0
    and FatherTrait Royal_Relation_Norwegian = 0

    Affects Royal_Relation_Norwegian  -1  Chance 100
;------------------------------------------
Trigger cleanup_relation_Kievian   
    WhenToTest CharacterComesOfAge

    Condition Trait BastardSon >= 1
    and Trait Royal_Relation_Kievan > 0
    and FatherTrait Royal_Relation_Kievan = 0

    Affects Royal_Relation_Kievan  -1  Chance 100

;*********  BLOODLINES TRIGGERS - ROYAL HOUSES *********
;------------------------------------------
Trigger Rebel_Found_RoyalHouse
    WhenToTest CharacterTurnStart

    Condition FactionType slave
          and I_TurnNumber = 0 

    Affects HouseMember  1  Chance  100

;------------------------------------------
Trigger FoundRoyalHouse                 
    WhenToTest BecomesFactionLeader

    Condition Trait BiologicalSon = 1
          and Trait HouseMember = 0
          and Trait Royal_Blood_English = 0
          and Trait Royal_Blood_French = 0
          and Trait Royal_Blood_HRE = 0
          and Trait Royal_Blood_Spanish = 0
          and Trait Royal_Blood_Sicilian = 0
          and Trait Royal_Blood_Venetian = 0
          and Trait Royal_Blood_Milanese = 0
          and Trait Royal_Blood_Scottish = 0
          and Trait Royal_Blood_Greek = 0
          and Trait Royal_Blood_Russian = 0
          and Trait Royal_Blood_Moorish = 0
          and Trait Royal_Blood_Turkish = 0
          and Trait Royal_Blood_Egyptian = 0
          and Trait Royal_Blood_Danish = 0
          and Trait Royal_Blood_Portuguese = 0
          and Trait Royal_Blood_Polish = 0
          and Trait Royal_Blood_Hungarian = 0
          and Trait Royal_Blood_Aragonese = 0
          and Trait Royal_Blood_Lithuanian = 0
          and Trait Royal_Blood_Timurids = 0
          and Trait Royal_Blood_Norwegian = 0
          and Trait Royal_Blood_Kievan = 0
          and Trait Royal_Blood_Cumans = 0
          and Trait Royal_Blood_Kwarezm = 0
          and Trait Royal_Blood_Jerusalem = 0

    Affects HouseFounder 1 Chance 100

;------------------------------------------
Trigger SonofHouseFounder
    WhenToTest CharacterComesOfAge

    Condition FatherTrait HouseFounder > 0

    Affects HouseMember  1  Chance  100

;------------------------------------------
Trigger SonofHouseMember
    WhenToTest CharacterComesOfAge

    Condition FatherTrait HouseMember > 0

    Affects HouseMember  1  Chance  100

;------------------------------------------
Trigger DaughterofHouseFounder
    WhenToTest CharacterComesOfAge

    Condition FatherTrait HouseFounder > 0
          and AgentType = princess

    Affects HousePrincess  1  Chance  100

;------------------------------------------
Trigger DaughterofHouseMember
    WhenToTest CharacterComesOfAge

    Condition FatherTrait HouseMember > 0
          and AgentType = princess

    Affects HousePrincess  1  Chance  100

;------------------------------------------
Trigger SonofNewRoyalHouseFounder
    WhenToTest CharacterTurnEnd

    Condition FatherTrait HouseFounder > 0
    and Trait HouseMember = 0
    and Trait BiologicalSon > 0

    Affects HouseMember  1  Chance  100

;------------------------------------------
Trigger BastardSonofNewRoyalHouseFounder
    WhenToTest CharacterTurnEnd

    Condition FatherTrait HouseFounder > 0
    and Trait HouseMember = 0
    and Trait BastardSon > 0

    Affects HouseMember  1  Chance  100

;------------------------------------------
Trigger DaughterofNewHouseFounder
    WhenToTest CharacterTurnEnd

    Condition FatherTrait HouseFounder > 0
    and AgentType = princess
    and Trait HousePrincess = 0

    Affects HousePrincess  1  Chance  100

;*********  MARRIAGE TRAIT TRIGGERS *********
;------------------------------------------
Trigger AI_marries
    WhenToTest CharacterMarries

    Condition FactionIsLocal

    Affects MarriageCertificate  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_daughterofkingprince
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait DaughterofKingPrince > 0

    Affects WifeIsDaughterofKingPrince  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_english
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_English > 0

    Affects WifeIsEnglish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_french
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_French > 0

    Affects WifeIsFrench  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_HRE
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_HRE > 0

    Affects WifeIsHRE  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_spanish
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Spanish > 0

    Affects WifeIsSpanish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_sicilian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Sicilian > 0

    Affects WifeIsSicilian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_venetian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Venetian > 0

    Affects WifeIsVenetian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_milanese
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Milanese > 0

    Affects WifeIsMilanese  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_scottish
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Scottish > 0

    Affects WifeIsScottish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_greek
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Greek > 0

    Affects WifeIsGreek  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_russian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Russian > 0

    Affects WifeIsRussian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_moorish
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Moorish > 0

    Affects WifeIsMoorish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_turkish
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Turkish > 0

    Affects WifeIsTurkish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_egyptian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Egyptian > 0

    Affects WifeIsEgyptian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_danish
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Danish > 0

    Affects WifeIsDanish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_portuguese
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Portuguese > 0

    Affects WifeIsPortuguese  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_polish
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Polish > 0

    Affects WifeIsPolish  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_hungarian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Hungarian > 0

    Affects WifeIsHungarian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Aragonese
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Aragonese > 0

    Affects WifeIsAragonese  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Jerusalem
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Jerusalem > 0

    Affects WifeIsJerusalem  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Lithuanian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Lithuanian > 0

    Affects WifeIsLithuanian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Timurids
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Timurids > 0

    Affects WifeIsTimurids  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Norwegian
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Norwegian > 0

    Affects WifeIsNorwegian  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Kievan
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Kievan > 0

    Affects WifeIsKievan  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Cumans
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Cumans > 0

    Affects WifeIsCumans  1  Chance  100

;------------------------------------------
Trigger family_generalmarries_Kwarezm
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait Princess_Royal_Blood_Kwarezm > 0

    Affects WifeIsKwarezm  1  Chance  100


;*********  HEALTH SYSTEM TRIGGERS *********
;------------------------------------------
Trigger PlayerScurvyDeathlyHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 1
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  5

;------------------------------------------
Trigger AIScurvyDeathlyHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 1
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyFailingHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 2
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  4

;------------------------------------------
Trigger AIScurvyFailingHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 2
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyUnhealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 3
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  3

;------------------------------------------
Trigger AIScurvyUnhealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 3
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyNormalHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 4
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  2

;------------------------------------------
Trigger AIScurvyNormalHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 4
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyHealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 5
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger AIScurvyHealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 5
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyFairHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 6
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger AIPlayerScurvyFairHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 6
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyBastionHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty > 6
          and not Trait ScurvyEncounter = 1
          and FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger AIScurvyBastionHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and RandomPercent > 50
          and Trait Diseased = 0
          and Trait HaleAndHearty > 6
          and not Trait ScurvyEncounter = 1
          and not FactionIsLocal
          and TimeInRegion < 2

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyDeathlyHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 1
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
          and FactionIsLocal

    Affects Scurvy  1  Chance  8

;------------------------------------------
Trigger AIScurvyDeathlyHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 1
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
          and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyFailingHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 2
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and FactionIsLocal

    Affects Scurvy  1  Chance  5

;------------------------------------------
Trigger AIScurvyFailingHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 2
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyUnHealthyLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 3
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and FactionIsLocal

    Affects Scurvy  1  Chance  4

;------------------------------------------
Trigger AIScurvyUnHealthyLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 3
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and not FactionIsLocal

    Affects Scurvy  1  Chance  2

;------------------------------------------
Trigger PlayerScurvyNormalHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 4
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger AIScurvyNormalHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 4
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyHealthyLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 5
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and FactionIsLocal

    Affects Scurvy  1  Chance  2

;------------------------------------------
Trigger AIScurvyHealthyLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 5
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyFairHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 6
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger AIScurvyFairHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 6
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyBastionHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 7
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger AIScurvyBastionHealthLinger
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 7
          and not Trait ScurvyEncounter = 1
          and TimeInRegion >= 2
    and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger PlayerScurvyAtSeaTest
    WhenToTest CharacterTurnEnd

    Condition AtSea
          and Trait Scurvy = 0
          and TimeInRegion > 1
    and FactionIsLocal

    Affects Scurvy  1  Chance  10

;------------------------------------------
Trigger AIScurvyAtSeaTest
    WhenToTest CharacterTurnEnd

    Condition AtSea
          and Trait Scurvy = 0
          and TimeInRegion > 1
    and not FactionIsLocal

    Affects Scurvy  1  Chance  1

;------------------------------------------
Trigger ScurvyDetermined
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and Trait Diseased = 0          

    Affects Diseased  1  Chance  100

;------------------------------------------
Trigger PlayerScurvyRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and not EndedInSettlement
    and Trait Robust = 0
    and FactionIsLocal

    Affects Healed  2  Chance  25

;------------------------------------------
Trigger RobustPlayerScurvyRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and not EndedInSettlement
    and Trait Robust = 1
    and FactionIsLocal

    Affects Healed  2  Chance  50

;------------------------------------------
Trigger AIScurvyRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and not EndedInSettlement
    and Trait Robust = 0
    and not FactionIsLocal

    Affects Healed  2  Chance  30

;------------------------------------------
Trigger RobustAIScurvyRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and not EndedInSettlement
    and Trait Robust = 1
    and not FactionIsLocal

    Affects Healed  2  Chance  80

;------------------------------------------
Trigger PlayerTownRecoveryScurvy
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and EndedInSettlement
    and Trait Robust = 0
    and FactionIsLocal

    Affects Healed  2  Chance  75

;------------------------------------------
Trigger RobustPlayerTownRecoveryScurvy
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and EndedInSettlement
    and Trait Robust = 1
    and FactionIsLocal

    Affects Healed  2  Chance  90

;------------------------------------------
Trigger AITownRecoveryScurvy
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and EndedInSettlement
    and Trait Robust = 0
    and not FactionIsLocal

    Affects Healed  2  Chance  90

;------------------------------------------
Trigger RobustAITownRecoveryScurvy
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and EndedInSettlement
    and Trait Robust = 1
    and not FactionIsLocal

    Affects Healed  2  Chance  100

;------------------------------------------
Trigger ScurvyRemoveHealth
    WhenToTest CharacterTurnEnd

    Condition Trait Scurvy = 1
          and Trait HaleAndHearty > 0          

    Affects HaleAndHearty  -25  Chance  100
    Affects ScurvyEncounter  1  Chance  90
    Affects ScurvyEncounter  1  Chance  10
    Affects ScurvyEncounter  1  Chance  1

;*********************Pnut's Diseases - Pneumonia
;------------------------------------------
Trigger PlayerPneumoniaDeathlyUnhealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 1
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal

    Affects Pneumonia  1  Chance  12

;------------------------------------------
Trigger AIPneumoniaDeathlyUnhealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 1
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  8

;------------------------------------------
Trigger PlayerPneumoniaFailingHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 2
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal

    Affects Pneumonia  1  Chance  8

;------------------------------------------
Trigger AIPneumoniaFailingHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 2
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  4

;------------------------------------------
Trigger PlayerPneumoniaUnhealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 3
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal

    Affects Pneumonia  1  Chance  6

;------------------------------------------
Trigger AIPneumoniaUnhealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 3
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  3

;------------------------------------------
Trigger PlayerPneumoniaNormalHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 4
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal

    Affects Pneumonia  1  Chance  5

;------------------------------------------
Trigger AIPneumoniaNormalHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 4
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  3

;------------------------------------------
Trigger PlayerPneumoniaHealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 5
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal
          and TimeInRegion >= 1

    Affects Pneumonia  1  Chance  4

;------------------------------------------
Trigger AIPneumoniaHealthy
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 5
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  2

;------------------------------------------
Trigger PlayerPneumoniaGoodHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 6
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal

    Affects Pneumonia  1  Chance  2

;------------------------------------------
Trigger AIPneumoniaGoodHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 6
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  1

;------------------------------------------
Trigger PlayerPneumoniaBastionHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 7
          and not Trait PneumoniaEncounter = 1
    and FactionIsLocal

    Affects Pneumonia  1  Chance  1

;------------------------------------------
Trigger AIPneumoniaBastionHealth
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and Trait Diseased = 0
          and Trait HaleAndHearty = 7
          and not Trait PneumoniaEncounter = 1
    and not FactionIsLocal

    Affects Pneumonia  1  Chance  1

;------------------------------------------
Trigger PneumoniaDetermined
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and Trait Diseased = 0          

    Affects Diseased  1  Chance  100

;------------------------------------------
Trigger PneumoniaRemoveHealth
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and Trait HaleAndHearty > 0          

    Affects HaleAndHearty  -25  Chance  100
    Affects PneumoniaEncounter  1  Chance  90
    Affects PneumoniaEncounter  1  Chance  10
    Affects PneumoniaEncounter  1  Chance  1

;------------------------------------------
Trigger PlayerPneumoniaRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and not EndedInSettlement
    and Trait Robust = 0
    and FactionIsLocal

    Affects Healed  2  Chance  30

;------------------------------------------
Trigger RobustPlayerPneumoniaRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and not EndedInSettlement
    and Trait Robust = 1
    and FactionIsLocal

    Affects Healed  2  Chance  60

;------------------------------------------
Trigger AIPneumoniaRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and not EndedInSettlement
    and Trait Robust = 0
    and not FactionIsLocal

    Affects Healed  2  Chance  50

;------------------------------------------
Trigger RobustAIPneumoniaRecovery
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and not EndedInSettlement
    and Trait Robust = 1
    and not FactionIsLocal

    Affects Healed  2  Chance  90

;------------------------------------------
Trigger PlayerTownRecoveryPneumonia
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and EndedInSettlement
    and Trait Robust = 0
    and FactionIsLocal

    Affects Healed  2  Chance  50

;------------------------------------------
Trigger RobustPlayerTownRecoveryPneumonia
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and EndedInSettlement
    and Trait Robust = 1
    and FactionIsLocal

    Affects Healed  2  Chance  75

;------------------------------------------
Trigger AITownRecoveryPneumonia
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and EndedInSettlement
    and Trait Robust = 0
    and not FactionIsLocal

    Affects Healed  2  Chance  75

;------------------------------------------
Trigger RobustAITownRecoveryPneumonia
    WhenToTest CharacterTurnEnd

    Condition Trait Pneumonia = 1
          and EndedInSettlement
    and Trait Robust = 1
    and not FactionIsLocal

    Affects Healed  2  Chance  90

;*********** Pnut's Diseases - Leprosy ***************
;------------------------------------------
;1 in 2500 characters in overcrowded city = lepers
Trigger PlayerLeprosyTest3
    WhenToTest CharacterTurnEnd

    Condition RandomPercent < 5
	and Trait HaleAndHearty > 0
	and EndedInSettlement
	and SettlementPopulationMaxedOut
	and FactionIsLocal

    Affects Leprosy  1  Chance  1

;------------------------------------------
;1 in 3333 characters in overcrowded city = lepers
Trigger AILeprosyTest3
    WhenToTest CharacterTurnEnd

    Condition RandomPercent < 4
	and Trait HaleAndHearty > 0
	and EndedInSettlement
	and SettlementPopulationMaxedOut
	and not FactionIsLocal

    Affects Leprosy  1  Chance  1

;------------------------------------------
Trigger PlayerLeprosyWitchTest
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 1
	and HighestAttAdjacentChar Magic witch < 4
	and Trait HaleAndHearty > 0
	and FactionIsLocal

    Affects Leprosy  1  Chance  8

;------------------------------------------
Trigger AILeprosyWitchTest
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 1
	and HighestAttAdjacentChar Magic witch < 4
	and Trait HaleAndHearty > 0
	and not FactionIsLocal

    Affects Leprosy  1  Chance  4

;------------------------------------------
Trigger PlayerLeprosyWitchTest2
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 4
	and HighestAttAdjacentChar Magic witch < 7
	and Trait HaleAndHearty > 0
	and FactionIsLocal

    Affects Leprosy  1  Chance  25

;------------------------------------------
Trigger AILeprosyWitchTest2
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 4
	and HighestAttAdjacentChar Magic witch < 7
	and Trait HaleAndHearty > 0
	and not FactionIsLocal

    Affects Leprosy  1  Chance  12

;------------------------------------------
Trigger PlayerLeprosyWitchTest3
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 7
	and Trait HaleAndHearty > 0
	and FactionIsLocal

    Affects Leprosy  1  Chance  40

;------------------------------------------
Trigger AILeprosyWitchTest3
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 7
	and Trait HaleAndHearty > 0
	and not FactionIsLocal

    Affects Leprosy  1  Chance  20

;------------------------------------------
Trigger LeprosyDetermined
    WhenToTest CharacterTurnEnd

    Condition Trait Leprosy = 1
	and Trait Diseased = 0          

    Affects Diseased  1  Chance  100

;------------------------------------------
Trigger LeprosyRemoveHealth
    WhenToTest CharacterTurnEnd

    Condition Trait Leprosy = 1
	and Trait HaleAndHearty > 0          

    Affects HaleAndHearty  -25  Chance  100

;************ Pnut's Health Loss/Recovery *****************
;------------------------------------------
Trigger HealthDiagnosisStartCampaign
    WhenToTest CharacterTurnStart

    Condition I_TurnNumber = 0

    Affects HaleAndHearty  12  Chance  100

;------------------------------------------
Trigger HealthDiagnosisChildren
    WhenToTest CharacterComesOfAge

    Affects HaleAndHearty  12  Chance  100

;------------------------------------------
Trigger HealthDiagnosisAdoption
    WhenToTest OfferedForAdoption

    Affects HaleAndHearty  12  Chance  100

;------------------------------------------
Trigger HealthDiagnosisLesserAdoption
    WhenToTest LesserGeneralOfferedForAdoption

    Affects HaleAndHearty  12  Chance  100

;------------------------------------------
Trigger HealthDiagnosisSuitor
    WhenToTest OfferedForMarriage

    Affects HaleAndHearty  12  Chance  100

;------------------------------------------
Trigger PlayerNaturalHealthDecline
    WhenToTest CharacterTurnEnd

    Condition RandomPercent > 75
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  -1  Chance  5

;------------------------------------------
Trigger AINaturalHealthDecline
    WhenToTest CharacterTurnEnd

    Condition RandomPercent > 75
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  -1  Chance  2

;------------------------------------------
Trigger PlayerHealthofBesieger
    WhenToTest CharacterTurnEnd

    Condition IsBesieging
          and CharacterNumTurnsIdle > 1
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  -1  Chance  33

;------------------------------------------
Trigger AIHealthofBesieger
    WhenToTest CharacterTurnEnd

    Condition IsBesieging
          and CharacterNumTurnsIdle > 1
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  -1  Chance  37

;------------------------------------------
Trigger PlayerHealthofBesieged
    WhenToTest CharacterTurnEnd

    Condition IsUnderSiege
          and CharacterNumTurnsIdle > 2
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  -2  Chance  50

;------------------------------------------
Trigger AIHealthofBesieged
    WhenToTest CharacterTurnEnd

    Condition IsUnderSiege
          and CharacterNumTurnsIdle > 2
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  -2  Chance  25

;------------------------------------------
Trigger PlayerHealthofPlagued
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and SettlementHasPlague
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  -1  Chance  100

;------------------------------------------
Trigger AIHealthofPlagued
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and SettlementHasPlague
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  -1  Chance  50

;------------------------------------------
Trigger PlayerHealthofInvaders
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and TimeInRegion > 1
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  -2  Chance  15

;------------------------------------------
Trigger AIHealthofInvaders
    WhenToTest CharacterTurnEnd

    Condition EndedInEnemyZOC
          and TimeInRegion > 1
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  -2  Chance  7

;------------------------------------------
Trigger PlayerHealthofSailors
    WhenToTest CharacterTurnEnd

    Condition AtSea
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  -1  Chance  30

;------------------------------------------
Trigger AIHealthofSailors
    WhenToTest CharacterTurnEnd

    Condition AtSea
          and Trait HaleAndHearty > 1
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  -1  Chance  15

;------------------------------------------
Trigger DiseasedRecoveryInWild ; characters recover unhealthy
    WhenToTest CharacterTurnEnd

    Condition Trait HaleAndHearty = 0
          and Trait Diseased = 0
          and not EndedInSettlement         

    Affects HaleAndHearty  9  Chance  100

;------------------------------------------
Trigger DiseasedRecoveryInTown ; characters recover unhealthy
    WhenToTest CharacterTurnEnd

    Condition Trait HaleAndHearty = 0
          and Trait Diseased = 0
          and EndedInSettlement         

    Affects HaleAndHearty  11  Chance  100

;------------------------------------------
Trigger PlayerNaturalHealthImprove
    WhenToTest CharacterTurnEnd 

    Condition RandomPercent < 61
          and not EndedInSettlement
          and Trait HaleAndHearty > 0
          and Trait Diseased = 0
    and FactionIsLocal

    Affects HaleAndHearty  1  Chance  5

;------------------------------------------
Trigger AINaturalHealthImprove
    WhenToTest CharacterTurnEnd 

    Condition RandomPercent < 61
          and not EndedInSettlement
          and Trait HaleAndHearty > 0
          and Trait Diseased = 0
    and not FactionIsLocal

    Affects HaleAndHearty  1  Chance  10

;------------------------------------------
Trigger PlayerDeathlyUnhealthyTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 0
          and Trait HaleAndHearty < 2
          and Trait Diseased = 0
          and not SettlementBuildingExists = public_baths
          and not SettlementBuildingExists = aqueduct
          and not SettlementBuildingExists = bimaristan
          and not SettlementBuildingExists = great_bimaristan
    and FactionIsLocal

    Affects HaleAndHearty  3  Chance  75

;------------------------------------------
Trigger AIDeathlyUnhealthyTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 0
          and Trait HaleAndHearty < 2
          and Trait Diseased = 0
          and not SettlementBuildingExists = public_baths
          and not SettlementBuildingExists = aqueduct
          and not SettlementBuildingExists = bimaristan
          and not SettlementBuildingExists = great_bimaristan
    and not FactionIsLocal

    Affects HaleAndHearty  3  Chance  90

;------------------------------------------
Trigger PlayerVeryUnhealthyTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 1
          and Trait HaleAndHearty < 3
          and Trait Diseased = 0
          and not SettlementBuildingExists = public_baths
          and not SettlementBuildingExists = aqueduct
          and not SettlementBuildingExists = bimaristan
          and not SettlementBuildingExists = great_bimaristan
    and FactionIsLocal

    Affects HaleAndHearty  2  Chance  75

;------------------------------------------
Trigger AIVeryUnhealthyTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 1
          and Trait HaleAndHearty < 3
          and Trait Diseased = 0
          and not SettlementBuildingExists = public_baths
          and not SettlementBuildingExists = aqueduct
          and not SettlementBuildingExists = bimaristan
          and not SettlementBuildingExists = great_bimaristan
    and not FactionIsLocal

    Affects HaleAndHearty  2  Chance  90

;------------------------------------------
Trigger UnhealthyTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 2
          and Trait HaleAndHearty < 4
          and Trait Diseased = 0
          and not SettlementBuildingExists = public_baths
          and not SettlementBuildingExists = aqueduct
          and not SettlementBuildingExists = bimaristan
          and not SettlementBuildingExists = great_bimaristan

    Affects HaleAndHearty  1  Chance  50

;------------------------------------------
Trigger HealthofCleanTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 0
          and Trait HaleAndHearty < 5
          and Trait Diseased = 0
          and SettlementBuildingExists = public_baths

    Affects HaleAndHearty  1  Chance  60

;------------------------------------------
Trigger HealthofCleanTownPerson2
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 0
          and Trait HaleAndHearty < 6
          and Trait Diseased = 0
          and SettlementBuildingExists = aqueduct

    Affects HaleAndHearty  1  Chance  75

;------------------------------------------
Trigger HealthofTreatedTownPerson
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 0
          and Trait HaleAndHearty < 7
          and Trait Diseased = 0
          and SettlementBuildingExists = bimaristan

    Affects HaleAndHearty  1  Chance  75

;------------------------------------------
Trigger HealthofTreatedTownPerson2
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not IsUnderSiege
          and Trait HaleAndHearty > 0
          and Trait HaleAndHearty < 7
          and Trait Diseased = 0
          and SettlementBuildingExists = great_bimaristan

    Affects HaleAndHearty  1  Chance  75

;------------------------------------------
Trigger RobustSicklyDiagnosis
    WhenToTest CharacterTurnStart

    Condition I_TurnNumber = 0
        and RandomPercent > 50

    Affects Robust  1  Chance  10
    Affects Sickly  1  Chance  10
    Affects RobustPrincess  1  Chance  10
    Affects SicklyPrincess  1  Chance  10

;------------------------------------------
Trigger RobustSickly_random_birth
    WhenToTest CharacterComesOfAge

    Affects Robust  1  Chance  3 
    Affects Sickly  1  Chance  2
    Affects RobustPrincess  1  Chance  3 
    Affects SicklyPrincess  1  Chance  2

;------------------------------------------
Trigger Robust_birth
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Robust = 1

    Affects Robust  1  Chance  25
    Affects RobustPrincess  1  Chance  25

;------------------------------------------
Trigger Robust_birth_thanksmom
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsRobust = 1

    Affects Robust  1  Chance  25
    Affects RobustPrincess  1  Chance  25

;------------------------------------------
Trigger family_generalmarries_robustprincess
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait RobustPrincess > 0

    Affects WifeIsRobust  1  Chance  100 

;------------------------------------------
Trigger Sickly_birth
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Sickly = 1
 
    Affects Sickly  1  Chance  25
    Affects SicklyPrincess  1  Chance  25

;------------------------------------------
Trigger Sickly_birth_thanksmom
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsSickly = 1

    Affects Sickly  1  Chance  25
    Affects SicklyPrincess  1  Chance  25 

;------------------------------------------
Trigger family_generalmarries_sicklyprincess
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait SicklyPrincess > 0

    Affects WifeIsSickly  1  Chance  100

;------------------------------------------
Trigger family4robustsickly
    WhenToTest CharacterMarries

    Affects WifeIsRobust  1  Chance  2
    Affects WifeIsSickly  1  Chance  2

;***********  REBELLION TRIGGERS  ************
;------------------------------------------
Trigger civil_war_or_not1
    WhenToTest BecomesFactionLeader

    Condition Trait Offensive_To_Nobles = 0
	and SettlementsTaken >= 7
	and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  1

;------------------------------------------
Trigger civil_war_or_not2
    WhenToTest BecomesFactionLeader

    Condition Trait Offensive_To_Nobles = 0
	and SettlementsTaken >= 15
	and FactionIsLocal 

    Affects Offensive_To_Nobles 1 Chance  2

;------------------------------------------
Trigger civil_war_or_not3
    WhenToTest BecomesFactionLeader

    Condition Trait Offensive_To_Nobles = 0
	and SettlementsTaken >= 25
	and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  3

;------------------------------------------
;usurper or asserting newly blue hued blood.
Trigger Usurper1
    WhenToTest BecomesFactionLeader

    Condition Trait Offensive_To_Nobles = 0
	and SettlementsTaken >= 7
	and Trait SonofKingPrince <= 0
	and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  3

;------------------------------------------
;Nation in debt!
Trigger Disgust_with_King's_Unreasonable_Finances
    WhenToTest CharacterTurnEnd

    Condition Trait Offensive_To_Nobles = 0
    and IsFactionLeader
    and Treasury < 0
    and Attribute Authority <= 2
    and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  4

;------------------------------------------
;Excommunication!
Trigger Disgust_with_King's_Religiona
    WhenToTest CharacterTurnEnd

    Condition FactionExcommunicated
    and IsFactionLeader
    and Trait Offensive_To_Nobles = 0
    and CharacterReligion catholic
    and Attribute Piety <= 4 
    and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  5

;------------------------------------------
Trigger civil_war_or_not_progress
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
	and Trait Offensive_To_Nobles = 1
	and Attribute Authority < 3
		and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  1

;------------------------------------------
;since the king isn't around... let's check again...
Trigger civil_war_or_not_progress_expedite
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and DistanceCapital >= 75
    and Trait Offensive_To_Nobles = 1
		and FactionIsLocal

    Affects Offensive_To_Nobles 1 Chance  3

;------------------------------------------
;The King is a Bad Fink!
;Trigger civil_war_or_not_progress_expedite_1
;    WhenToTest CharacterTurnEnd
;
;    Condition IsFactionLeader
;    and Attribute Chivalry <= -5
;    and Trait Offensive_To_Nobles = 1
;
;    Affects Offensive_To_Nobles 1 Chance  2
;
;------------------------------------------
;The King is not looking out for the salvation of our souls
;Trigger Disgust_with_King's_Religionb_ai
;    WhenToTest CharacterTurnEnd
;
;    Condition FactionExcommunicated
;    and IsFactionLeader
;    and Trait Offensive_To_Nobles = 0
;    and CharacterReligion catholic
;    and Attribute Piety <= 4
;    and not FactionIsLocal ;strictly AI
;
;    Affects Offensive_To_Nobles 1 Chance  1
;
;------------------------------------------
Trigger civil_war_king_regains_control1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
	and Trait Offensive_To_Nobles >= 1
	and DistanceCapital < 50
		and Attribute Authority >= 3

    Affects Offensive_To_Nobles -1 Chance  50

;------------------------------------------
;Trigger civil_war_king_regains_control2
;    WhenToTest CharacterTurnEnd
;
;    Condition IsFactionLeader
;	and Attribute Chivalry > 4
;	and DistanceCapital < 50
;	and Trait Offensive_To_Nobles >= 1
;
;    Affects Offensive_To_Nobles -1 Chance  10
;
;------------------------------------------
Trigger Authority_Loss_Over_Time
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
		and FactionIsLocal
    and Trait Offensive_To_Nobles > 1

    Affects KingsAuthorityReset  1 Chance  30

;------------------------------------------
;Disobedient = 0 is the initial step- no returning back...
;only really need one level for this
Trigger Civil_War_Loyal_General1
    WhenToTest CharacterTurnEnd

    Condition FactionLeaderTrait Offensive_To_Nobles = 2
    and IsGeneral
    and Trait Disobedient = 0
    and Trait Obedient = 0
    and Attribute Loyalty >= 5
    and not IsFactionLeader

    Affects Obedient 1 Chance 100
;(adds 2 loyalty) 100% if >= 5 Loyalty
;------------------------------------------
Trigger Civil_War_Loyal_General2
    WhenToTest CharacterTurnEnd

    Condition FactionLeaderTrait Offensive_To_Nobles = 2
    and IsGeneral
    and Trait Disobedient = 0
    and Trait Obedient = 0
    and Attribute Loyalty < 5
    and not IsFactionLeader

    Affects Obedient 1 Chance 50
;50% if <= 4 Loyalty
;------------------------------------------
Trigger Civil_War_Rebel_General1
    WhenToTest CharacterTurnEnd

    Condition FactionLeaderTrait Offensive_To_Nobles = 2
		and FactionIsLocal
    and IsGeneral
    and Attribute Loyalty < 5
    and not Trait Obedient = 1
	and not Trait Disobedient = 2
    and not Trait Loyal >= 2
    and not IsFactionLeader

    Affects Disobedient 1 Chance 25

;------------------------------------------
Trigger Civil_War_Rebel_General2
    WhenToTest CharacterTurnEnd

    Condition FactionLeaderTrait Offensive_To_Nobles = 2
		and FactionIsLocal
    and IsGeneral
    and not Trait Obedient = 1
	and not Trait Disobedient = 2
    and not Trait Loyal >= 2
    and Trait Disloyal >= 2
    and not IsFactionLeader

    Affects Disobedient 1 Chance 75

;------------------------------------------
Trigger Civil_War_FullRebel_General1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
		and FactionIsLocal
    and EndedInSettlement
    and Trait Disobedient = 2
    and Trait Locked = 0

    Affects Locked 1 Chance  75

;------------------------------------------
Trigger Civil_War_King_Gains_Control1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Disobedient >= 1
    and FactionLeaderTrait Offensive_To_Nobles < 1

    Affects Obedient 1 Chance  100

;------------------------------------------
Trigger Civil_War_King_Gains_Control2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
		and FactionIsLocal
    and Trait Obedient >= 1
    and FactionLeaderTrait Offensive_To_Nobles < 1

    Affects Disobedient 1 Chance  100

;------------------------------------------
Trigger Civil_War_King_Gains_Control3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Disobedient >= 1
    and FactionType Slave

    Affects Obedient 1 Chance  100

;------------------------------------------
Trigger Civil_War_King_Gains_Control4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and Trait Locked = 1
    and FactionLeaderTrait Offensive_To_Nobles < 1

    Affects Locked -1 Chance  100


;************ LOYALTY TRIGGERS **************
;------------------------------------------
;AI OK for this one
Trigger Near_Loyalty_trigger
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
		and FactionIsLocal
    and not IsFactionHeir
    and not IsFactionLeader
    and DistanceCapital < 25
    and not Trait Near_Loyalty >= 4
    and not FactionType mongols
    and not FactionType slave

    Affects Near_Loyalty 1 Chance 20

;------------------------------------------
Trigger Far_Loyalty_trigger
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
		and FactionIsLocal
    and not IsOnCrusade
    and not IsOnJihad
    and not IsFactionHeir
    and not IsFactionLeader
    and not FactionType mongols
    and not FactionType slave
    and DistanceCapital > 75
    and not Trait Far_Loyalty >= 10

    Affects Far_Loyalty 1 Chance 15

;------------------------------------------
Trigger Untitled_trigger
    WhenToTest CharacterTurnEnd

    Condition not HasAncType dearmad_her
    and not IsFactionHeir
    and not IsFactionLeader
    and Trait Untitled = 0

    Affects Untitled 1 Chance 100

;------------------------------------------
Trigger Titled_trigger
    WhenToTest CharacterTurnEnd

    Condition HasAncType dearmad_her
    and not IsFactionHeir
    and not IsFactionLeader
    and Trait Untitled = 1

    Affects Titled 2 Chance 100

;------------------------------------------
Trigger Titled_trigger2
    WhenToTest CharacterTurnEnd

    Condition HasAncType dearmad_her
    and not IsFactionHeir
    and not IsFactionLeader
    and not Trait Titled >= 1

    Affects Titled 1 Chance 100

;------------------------------------------
Trigger Stripped_of_title
    WhenToTest CharacterTurnEnd

    Condition not HasAncType dearmad_her
    and Trait Titled >= 1
    and not IsFactionLeader

    Affects Stripped 1 Chance 100

;------------------------------------------
Trigger Loyalty_Check_LostBattle
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess >= average
          and I_ConflictType Normal
          and BattleOdds > 0.75

    Affects DiscontentGeneral  1  Chance  50 

;------------------------------------------
Trigger Loyalty_Check_Prisoners1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType execute
          and NumCapturedSoldiers > 50
          and Attribute Chivalry >= 4

    Affects DiscontentGeneral  1  Chance  33 

;------------------------------------------
Trigger Loyalty_Check_Prisoners2
    WhenToTest ExterminatePopulation

    Condition Attribute Chivalry >= 4

    Affects DiscontentGeneral  1  Chance  50 

;------------------------------------------
Trigger Loyalty_Check_Piety
    WhenToTest CharacterTurnEnd

    Condition FactionExcommunicated
          and not IsFactionLeader
          and IsGeneral
          and Attribute Piety >= 4

    Affects DiscontentGeneral  1  Chance  50 

;------------------------------------------
Trigger Loyalty_Check_Buildings1
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not GovernorBuildingExists >= stone_wall
          and not GovernorBuildingExists >= castle
          and Attribute Command > 4
          and DistanceCapital > 75

    Affects DiscontentGeneral  1  Chance  5 

;------------------------------------------
Trigger Loyalty_Check_Adoption
    WhenToTest BrotherAdopted

    Condition not IsFactionHeir

    Affects DiscontentGeneral  1  Chance  33 

;------------------------------------------
Trigger Loyalty_Check_Oppossed_Attributes
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and Attribute Chivalry >= 3
          and FactionLeaderAttribute Chivalry <= -3

    Affects DiscontentGeneral  1  Chance  5 

;------------------------------------------
Trigger Loyalty_Check_WonBattle
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and I_ConflictType Normal
          and BattleOdds < 1.75

    Affects ContentGeneral  1  Chance  75 

;------------------------------------------
Trigger Loyalty_Check_Buildings2
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and GovernorBuildingExists >= large_stone_wall
          and Attribute Command < 6

    Affects ContentGeneral  1  Chance  15 

;------------------------------------------
Trigger Loyalty_Check_Buildings3
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and GovernorBuildingExists >= fortress
          and Attribute Command < 6

    Affects ContentGeneral  1  Chance  15 

;------------------------------------------
Trigger Loyalty_Check_Similar_Attributes
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and Attribute Chivalry >= 3
          and FactionLeaderAttribute Chivalry >= 3

    Affects ContentGeneral  1  Chance  5 

;*********  VANILLA MARRIAGE TRIGGERS  ********* 
;------------------------------------------
Trigger family_generalmarries_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait UnchasteWoman > 0

    Affects Cuckold  2  Chance  85

;------------------------------------------
Trigger family_generalmarries_royalty
    WhenToTest CharacterMarriesPrincess

    Affects MarriedAPrincess  1  Chance  100 

;------------------------------------------
Trigger family_generalmarries_charming_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm > 4

    Affects WifeIsCharming  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_charming_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm > 6

    Affects WifeIsCharming  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_charming_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm > 8

    Affects WifeIsCharming  1  Chance  85

;------------------------------------------
Trigger family_generalmarries_domineering_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm > 6

    Affects WifeIsDomineering  1  Chance  50 

;------------------------------------------
Trigger family_generalmarries_domineering_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm > 8

    Affects WifeIsDomineering  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_fertile_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Fertility > 1

    Affects WifeIsFertile  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_fertile_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Fertility > 2

    Affects WifeIsFertile  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_fertile_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Fertility > 3

    Affects WifeIsFertile  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_educated_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait EducatedWoman >= 1

    Affects WifeIsWise  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_educated_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait EducatedWoman >= 2

    Affects WifeIsWise  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_educated_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait EducatedWoman = 3

    Affects WifeIsWise  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_fair_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait FairWoman >= 1

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_fair_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait FairWoman >= 2

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_fair_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait FairWoman = 3

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_humble_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait HumbleWoman >= 1

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_humble_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait HumbleWoman >= 2

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_humble_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait BraveWoman >= 1

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_spirited_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait SpiritedWoman >= 1

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_spirited_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait SpiritedWoman >= 2

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_spirited_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait SpiritedWoman = 3

    Affects WifeIsNoble  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_barren_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Fertility < 0

    Affects WifeIsBarren  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_barren_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Fertility < -1

    Affects WifeIsBarren  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_barren_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Fertility < -2

    Affects WifeIsBarren  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_bitch_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait PretentiousWoman >= 1

    Affects WifeIsBitch  1  Chance  75 

;------------------------------------------
Trigger family_generalmarries_bitch_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait PretentiousWoman >= 2

    Affects WifeIsBitch  1  Chance  75 

;------------------------------------------
Trigger family_generalmarries_bitch_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseTrait HarshWoman >= 1

    Affects WifeIsBitch  1  Chance  85 

;------------------------------------------
Trigger family_generalmarries_horrid_0
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm < 4

    Affects WifeIsHorrid  1  Chance  50

;------------------------------------------
Trigger family_generalmarries_horrid_1
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm < 3

    Affects WifeIsHorrid  1  Chance  50

;------------------------------------------
Trigger family_generalmarries_horrid_2
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm < 2

    Affects WifeIsHorrid  1  Chance  50

;------------------------------------------
Trigger family_generalmarries_horrid_3
    WhenToTest CharacterMarriesPrincess

    Condition SpouseAttribute Charm < 1

    Affects WifeIsHorrid  1  Chance  50


;*********** AUTHORITY/KING TRIGGERS ************
;------------------------------------------
Trigger Civil_War_Cleanup_King1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Obedient = 1

    Affects Disobedient 1 Chance  100

;------------------------------------------
Trigger Civil_War_Cleanup_King2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Disobedient >= 1

    Affects Obedient 1 Chance  100

;------------------------------------------
Trigger Civil_War_Cleanup_King3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Locked = 1

    Affects Locked -1 Chance  100

;------------------------------------------
Trigger Cleanup_the_king3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Loves_Father > 0

    Affects Hates_Father 1 Chance  100

;------------------------------------------
Trigger cleanup_the_king4
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Hates_Father > 0

    Affects Loves_Father 1 Chance  100

;------------------------------------------
Trigger cleanup_the_king5
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Stripped > 0

    Affects Stripped -1 Chance  100

;------------------------------------------
Trigger cleanup_the_king6
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Near_Loyalty > 0

    Affects Near_Loyalty -1 Chance  100

;------------------------------------------
Trigger cleanup_the_king7
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait Far_Loyalty > 0

    Affects Far_Loyalty -1 Chance  100

;------------------------------------------
Trigger Cleanup_King_ContentGeneral
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait ContentGeneral > 0

    Affects ContentGeneral -1 Chance  100

;------------------------------------------
Trigger Cleanup_King_DiscontentGeneral
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and Trait DiscontentGeneral > 0

    Affects DiscontentGeneral -1 Chance  100

;need to place all Authority triggers in one place so can
;proparly see how to improve and escape rebellion
;Trigger Authority_Loss_Over_Time
;------------------------------------------
Trigger King_BecomesLeader
    WhenToTest BecomesFactionLeader

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_Chivalry
    WhenToTest BecomesFactionLeader

    Condition Attribute Chivalry > 5

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_Dread
    WhenToTest BecomesFactionLeader

    Condition Attribute Chivalry < -5

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_Relic
    WhenToTest BecomesFactionLeader

    Condition HasAncType Relic

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_OrnateC
    WhenToTest BecomesFactionLeader

    Condition FactionBuildingExists >= cathedral

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_OrnateO
    WhenToTest BecomesFactionLeader

    Condition FactionBuildingExists >= cathedral_o

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_OrnateI
    WhenToTest BecomesFactionLeader

    Condition FactionBuildingExists >= jama

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_Married
    WhenToTest BecomesFactionLeader

    Condition Trait WifeIsDomineering = 1

    Affects KingsAuthorityReset  1  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_Married2
    WhenToTest BecomesFactionLeader

    Condition Trait WifeIsDomineering = 2

    Affects KingsAuthorityReset  2  Chance  100

;------------------------------------------
Trigger King_BecomesLeader_Bastard
    WhenToTest BecomesFactionLeader

    Condition Trait BastardSon = 1

    Affects KingsAuthorityReset  1  Chance  100

;------------------------------------------
Trigger King_GovernorDiplomatCreated
   WhenToTest GovernorAgentCreated
        
   Condition IsFactionLeader
        and AgentType = diplomat
        
    Affects KingsAuthority  1  Chance  25

;------------------------------------------
Trigger King_Marries
    WhenToTest CharacterMarriesPrincess

    Condition IsFactionLeader

    Affects KingsAuthority  2  Chance  100

;------------------------------------------
Trigger King_Marries_Dom1
    WhenToTest CharacterMarriesPrincess

    Condition IsFactionLeader
	and Trait WifeIsDomineering = 1

    Affects KingsAuthorityReset  1  Chance  100

;------------------------------------------
Trigger King_Marries_Dom2
    WhenToTest CharacterMarriesPrincess

    Condition IsFactionLeader
	and Trait WifeIsDomineering = 2

    Affects KingsAuthorityReset  2  Chance  100

;------------------------------------------
Trigger King_Fathers_Children
   WhenToTest CharacterBecomesAFather
        
   Condition IsFactionLeader
        
    Affects KingsAuthority  1  Chance  33

;------------------------------------------
Trigger King_Employs_Bribery
    WhenToTest LeaderOrderedBribery

    Affects KingsAuthority  1  Chance  20 
    Affects DeceiverVirtue  1  Chance  10 
    Affects StrategyDread  1  Chance  25

;------------------------------------------
Trigger King_Employs_Spies_Success
    WhenToTest LeaderOrderedSpyingMission

   Condition IsFactionLeader
        and MissionSuccessLevel >= slightly_successful

    Affects KingsAuthority  1  Chance  20
    Affects SpyMaster  1  Chance  25
    Affects DeceiverVirtue  1  Chance  2 
    Affects StrategyDread  1  Chance  5

;------------------------------------------
Trigger King_Employs_Spies_Failure
    WhenToTest LeaderOrderedSpyingMission

   Condition IsFactionLeader
        and MissionSuccessLevel < slightly_successful

    Affects KingsAuthorityReset  1  Chance  100
    Affects SpyMaster  -1  Chance  25

;------------------------------------------
Trigger King_Employes_Assassins_Success
    WhenToTest LeaderOrderedAssassination

   Condition IsFactionLeader
        and MissionSuccessLevel >= slightly_successful

    Affects KingsAuthority  1  Chance  20
    Affects AssassinMaster  1  Chance  33
    Affects DeceiverVirtue  1  Chance  5 
    Affects StrategyDread  1  Chance  33 

;------------------------------------------
Trigger King_Employes_Assassins_Failure
    WhenToTest LeaderOrderedAssassination

   Condition IsFactionLeader
        and MissionSuccessLevel < slightly_successful

    Affects KingsAuthorityReset  1  Chance  33
;    Affects AssassinMaster  1  Chance  5
;    Affects DeceiverVirtue  1  Chance  10 
;    Affects StrategyDread  1  Chance  25

;------------------------------------------
Trigger King_Employes_Sabotage
    WhenToTest LeaderOrderedSabotage

    Condition IsFactionLeader

    Affects KingsAuthority  1  Chance  20
    Affects Despoiler  1  Chance  85 
    Affects DeceiverVirtue  1  Chance  5

;------------------------------------------
Trigger King_Employs_Diplomacy
    WhenToTest LeaderOrderedDiplomacy

    Condition IsFactionLeader

    Affects KingsAuthority  1  Chance  33

;------------------------------------------
Trigger King_MissionSuccess
    WhenToTest LeaderMissionSuccess

    Condition IsFactionLeader

    Affects KingsAuthority  1  Chance  33

;------------------------------------------
Trigger King_MissionFailure
    WhenToTest LeaderMissionFailed

    Condition IsFactionLeader

    Affects KingsAuthorityReset  1  Chance  25

;------------------------------------------
Trigger King_Returns_Rome_Success
    WhenToTest LeaderMissionSuccess

    Condition MissionID return_papal_settlement

    Affects KingsAuthority  1  Chance  100
    Affects AdoredByPope  1  Chance  100 

;------------------------------------------
Trigger King_Returns_Rome_Failure
    WhenToTest LeaderMissionFailed

    Condition MissionID return_papal_settlement

    Affects KingsAuthorityReset  2  Chance  100
    Affects AdoredByPope  -1  Chance  100 

;------------------------------------------
Trigger papalmission2
    WhenToTest LeaderMissionSuccess

    Condition PaybackID pope_rome_min_penalty_min_reward

    Affects AdoredByPope  1  Chance  5
    Affects KingsAuthority  1  Chance  10 

;------------------------------------------
Trigger papalmission3
    WhenToTest LeaderMissionSuccess

    Condition PaybackID pope_rome_min_penalty_mod_reward

    Affects AdoredByPope  1  Chance  8 
    Affects KingsAuthority  1  Chance  15

;------------------------------------------
Trigger papalmission4
    WhenToTest LeaderMissionSuccess

    Condition PaybackID pope_rome_min_penalty_major_reward

    Affects AdoredByPope  1  Chance  15 
    Affects KingsAuthority  1  Chance  20

;------------------------------------------
Trigger papalmission5
    WhenToTest LeaderMissionSuccess

    Condition MissionID assassinate_cardinal 

    Affects PopesEnforcer  1  Chance  100 

;------------------------------------------
Trigger King_OnTheThrone
   WhenToTest CharacterTurnEnd
        
   Condition IsFactionLeader
        and DistanceCapital < 10
        
    Affects KingsAuthority  1  Chance  3
        
;------------------------------------------
Trigger King_AwayFromThrone
   WhenToTest CharacterTurnEnd
        
   Condition IsFactionLeader
        and DistanceCapital >= 60

    Affects KingsAuthorityReset  1  Chance  10

;------------------------------------------
Trigger King_Excommuinicated
   WhenToTest CharacterTurnEnd
        
   Condition IsFactionLeader
        and FactionIsLocal
        and FactionExcommunicated
        and Attribute Piety < 5

    Affects KingsAuthorityReset  1  Chance  10

;------------------------------------------
Trigger King_Conquers_Constantinople
    WhenToTest GeneralCaptureSettlement

    Condition IsFactionLeader
	and SettlementName Constantinople

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_Conquers_Jerusalem
    WhenToTest GeneralCaptureSettlement

    Condition IsFactionLeader
	and SettlementName Jerusalem

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_Conquers_Baghdad
    WhenToTest GeneralCaptureSettlement

    Condition IsFactionLeader
	and SettlementName Baghdad

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_Conquers_Cordoba
    WhenToTest GeneralCaptureSettlement

    Condition IsFactionLeader
	and SettlementName Cordoba

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_Conquers_Rome
    WhenToTest GeneralCaptureSettlement

    Condition IsFactionLeader
	and SettlementName Rome
	and not CharacterReligion catholic

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_Battle_Heroic
   WhenToTest PostBattle
  
    Condition IsFactionLeader
	and WonBattle
	and GeneralFoughtInCombat
	and BattleSuccess = crushing
	and I_ConflictType Normal
	and BattleOdds < 1.5

    Affects KingsAuthority  1  Chance  100

;------------------------------------------
Trigger King_Battle_Useless
   WhenToTest PostBattle
        
   Condition IsFactionLeader
        and not WonBattle
        and BattleOdds > 1.5
        
    Affects KingsAuthorityReset  1  Chance  100
        
;------------------------------------------
Trigger King_Battle_RunsAway
   WhenToTest PostBattle

   Condition IsFactionLeader
        and Routs

    Affects KingsAuthorityReset  1  Chance  100

;------------------------------------------
Trigger King_City_Riots
   WhenToTest GovernorCityRiots

   Condition IsFactionLeader

    Affects KingsAuthorityReset  1  Chance  100

;------------------------------------------
Trigger King_City_Rebels
   WhenToTest GovernorCityRebels

   Condition IsFactionLeader

    Affects KingsAuthorityReset  2  Chance  100

;------------------------------------------
Trigger King_Faction_NoCash
   WhenToTest CharacterTurnEnd

   Condition IsFactionLeader
	and FactionIsLocal
        and Treasury < 0

   Affects KingsAuthorityReset  1 Chance 33

;------------------------------------------
Trigger King_building_religionC
    WhenToTest GovernorBuildingCompleted

    Condition IsFactionLeader
	and SettlementBuildingFinished > church

   Affects KingsAuthority 1 Chance 75
   Affects PublicFaith 1 Chance 33

;------------------------------------------
Trigger King_building_religionO
    WhenToTest GovernorBuildingCompleted

    Condition IsFactionLeader
	and SettlementBuildingFinished > church_o

   Affects KingsAuthority 1 Chance 75
   Affects PublicFaith 1 Chance 33

;------------------------------------------
Trigger King_building_religionI
    WhenToTest GovernorBuildingCompleted

    Condition IsFactionLeader
	and SettlementBuildingFinished > masjid

   Affects KingsAuthority 1 Chance 75
   Affects PublicFaith 1 Chance 33

;------------------------------------------
Trigger King_MilitaryEducated
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Military_Edu > 2
	and Trait Educated_Authority < 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_PaganEducated
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Pagan_Edu > 2
	and Trait Educated_Authority < 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_WesternEducated
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Western_Edu > 2
	and Trait Educated_Authority < 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_WesternEducated2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Western_Edu > 2
        and Trait Military_Edu > 2
	and Trait Educated_Authority = 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_EasternEducated
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Eastern_Edu > 2
	and Trait Educated_Authority < 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_EasternEducated2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Eastern_Edu > 2
        and Trait Military_Edu > 2
	and Trait Educated_Authority = 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_GreekEducated
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Greek_Edu > 2
	and Trait Educated_Authority < 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;------------------------------------------
Trigger King_GreekEducated2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and Trait Greek_Edu > 2
        and Trait Military_Edu > 2
	and Trait Educated_Authority = 1

    Affects KingsAuthority  1  Chance  100
    Affects Educated_Authority  1  Chance  100

;--------------------------------------------
Trigger King_HigherEducation
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and EndedInSettlement
        and RemainingMPPercentage = 100
        and SettlementBuildingExists >= school
        and SettlementBuildingExists >= library
	and Trait Wantschool < 1

    Affects KingsAuthority 1 Chance 4

;------------------------------------------
Trigger King_Diseased
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait Diseased = 1 

    Affects KingsAuthorityReset  1  Chance  5

;*********  AGENT TRAITS TRIGGERS  *********
;------------------------------------------
Trigger AssassinCareerTest
    WhenToTest AssassinationMission

    Condition AgentType = assassin
    and MissionSuccessLevel = highly_successful

   Affects AssassinCareer  1  Chance  10

;------------------------------------------
Trigger AssassinCareerTest1
    WhenToTest AssassinationMission

    Condition AgentType = assassin
    and MissionSuccessLevel = partly_successful

    Affects AssassinCareer  1  Chance  5

;------------------------------------------
Trigger DiplomatCareerTest
    WhenToTest DiplomacyMission

    Condition AgentType = diplomat
    and MissionSuccessLevel > not_successful
    and DiplomaticStanceFactions = Allied
    and Trait DiplomatCareer = 0

    Affects DiplomatCareer  1  Chance  100

;------------------------------------------
Trigger DiplomatCareerTest2
    WhenToTest DiplomacyMission

    Condition AgentType = diplomat
    and MissionSuccessLevel > not_successful
    and DiplomaticStanceFactions = Allied
    and Trait DiplomatCareer = 1

    Affects DiplomatCareer  1  Chance  50

;------------------------------------------
Trigger SpyCareerTest
    WhenToTest SpyMission

    Condition AgentType = spy
    and MissionSuccessLevel = highly_successful

    Affects SpyCareer  1  Chance  10

;------------------------------------------
Trigger SpyCareerTest1
    WhenToTest SpyMission

    Condition AgentType = spy
    and MissionSuccessLevel = partly_successful

    Affects SpyCareer  1  Chance  5

;------------------------------------------
Trigger SpyCareerTest2
    WhenToTest SpyMission

    Condition ProbabilitySuccess > 30
    and ProbabilitySuccess < 65
    and AgentType = spy

    Affects SpyCareer  1  Chance  33

;------------------------------------------
Trigger SpyCareerTest3
    WhenToTest SpyMission

    Condition ProbabilitySuccess > 65
    and AgentType = spy
    and MissionSuccessLevel = highly_successful

    Affects SpyCareer  1  Chance  10

;------------------------------------------
Trigger Priest_Visit_Rome_player
    WhenToTest CharacterTurnEnd

    Condition CharacterReligion catholic
        and AgentType = priest
    	and IsRegionOneOf 111 Roman_Province
        and TimeInRegion > 1
	and FactionIsLocal
        and Trait PriestCatholicDoctrine = 0

    Affects PriestCatholicDoctrine  1  Chance  100

;------------------------------------------
Trigger Priest_Visit_Rome_Ai
    WhenToTest CharacterTurnEnd

    Condition CharacterReligion catholic
        and AgentType = priest
    	and IsRegionOneOf 111 Roman_Province
        and TimeInRegion > 1
	and not FactionIsLocal
        and Trait PriestCatholicDoctrine = 0

    Affects PriestCatholicDoctrine  1  Chance  100
    Affects StrongFaith 1 Chance 100

;------------------------------------------
Trigger Priest_Visit_Constantinople
    WhenToTest CharacterTurnEnd

    Condition CharacterReligion orthodox
        and AgentType = priest
        and IsRegionOneOf 105 Constantinople_Province
        and TimeInRegion > 1
        and Trait PriestOrthodoxDoctrine = 0

    Affects PriestOrthodoxDoctrine  1  Chance  100

;------------------------------------------
Trigger Priest_Visit_Mecca_Doctrine
    WhenToTest CharacterTurnEnd

    Condition IsRegionOneOf 198 Mecca_Province
	and AgentType = priest
	and CharacterReligion islam
	and TimeInRegion > 1
	and Trait PriestIslamicDoctrine = 0

    Affects PriestIslamicDoctrine  1  Chance  100

;------------------------------------------
Trigger Priest_Visit_JerusalemRegion_All
    WhenToTest CharacterTurnEnd

    Condition IsRegionOneOf 183 Jerusalem_Province
	and AgentType = priest
        and not CharacterReligion pagan
    	and TimeInRegion > 1
    	and Trait StrongFaith <= 4

    Affects StrongFaith 1 Chance 33

;------------------------------------------
Trigger Priest_Visit_JerusalemRegion_CatholicAi
    WhenToTest CharacterTurnEnd

    Condition IsRegionOneOf 183 Jerusalem_Province
	and AgentType = priest
        and CharacterReligion catholic
	and not FactionIsLocal
    	and TimeInRegion > 1
    	and Trait StrongFaith <= 4

    Affects StrongFaith 1 Chance 50

;------------------------------------------
Trigger Priest_Visit_EmbiRegion
    WhenToTest CharacterTurnEnd

    Condition IsRegionOneOf 45 Embi_Province
	and AgentType = priest
    	and TimeInRegion > 3
    	and Trait StrongFaith <= 3
    	and FactionType cumans

    Affects StrongFaith 1 Chance 40

;------------------------------------------
Trigger Priest_Visit_Mecca_Faith
    WhenToTest CharacterTurnEnd	

    Condition IsRegionOneOf 198 Mecca_Province	
	and AgentType = priest
        and CharacterReligion islam
    	and TimeInRegion > 3
    	and Trait StrongFaith <= 3

    Affects StrongFaith 1 Chance 50

;*********  HEREDITY TRAITS TRIGGERS  *********
;------------------------------------------
Trigger BiologicalSonComesofAge
    WhenToTest CharacterComesOfAge

    Condition I_TurnNumber > 0
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order

    Affects BiologicalSon  1  Chance  100

;------------------------------------------
Trigger HorridWifeNotMother1
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHorrid = 1
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  20

;------------------------------------------
Trigger HorridWifeNotMother2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHorrid = 2
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  50

;------------------------------------------
Trigger HorridWifeNotMother3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHorrid = 3
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  80  

;------------------------------------------
Trigger BitchWifeNotMother1
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBitch = 1
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  15

;------------------------------------------
Trigger BitchWifeNotMother2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBitch = 2
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  30

;------------------------------------------
Trigger BitchWifeNotMother3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBitch = 3
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  45

;------------------------------------------
Trigger BarrenWifeNotMother1
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBarren = 1
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  30

;------------------------------------------
Trigger BarrenWifeNotMother2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBarren = 2
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  40

;------------------------------------------
Trigger BarrenWifeNotMother3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBarren = 3
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  50

;------------------------------------------
Trigger UnfaithfulFather1
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Girls >= 1
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order
          
    Affects BastardSon  2  Chance  45

;------------------------------------------
Trigger HorridWifeNotMother4
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHorrid >= 1
	and AgentType = princess

    Affects BastardDaughter 1 Chance  30

;------------------------------------------
Trigger HorridWifeNotMother5
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHorrid >= 2
	and AgentType = princess

    Affects BastardDaughter 1 Chance  50

;------------------------------------------
Trigger HorridWifeNotMother6
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsHorrid >= 3
	and AgentType = princess

    Affects BastardDaughter 1 Chance  80

;------------------------------------------
Trigger BitchWifeNotMother4
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBitch >= 1
	and AgentType = princess

    Affects BastardDaughter 1 Chance  30

;------------------------------------------
Trigger BitchWifeNotMother5
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBitch >= 2
	and AgentType = princess

    Affects BastardDaughter 1 Chance  45

;------------------------------------------
Trigger BitchWifeNotMother6
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBitch >= 3
	and AgentType = princess

    Affects BastardDaughter 1 Chance  60

;------------------------------------------
Trigger BarrenWifeNotMother4
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBarren >= 1
	and AgentType = princess

    Affects BastardDaughter 1 Chance  20

;------------------------------------------
Trigger BarrenWifeNotMother5
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBarren >= 2
	and AgentType = princess

    Affects BastardDaughter 1 Chance  35

;------------------------------------------
Trigger BarrenWifeNotMother6
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsBarren >= 3
	and AgentType = princess

    Affects BastardDaughter 1 Chance  60

;------------------------------------------
Trigger UnfaithfulFather2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Girls >= 1
          and AgentType = princess
          
    Affects BastardDaughter 1  Chance  45 

;------------------------------------------
Trigger grandsonofprince
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Factionleader > 0
        and not FatherTrait Factionheir > 0
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order

    Affects SonofKingPrince  1  Chance  100

;------------------------------------------
Trigger grandsonofking
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Factionheir > 0
        and not FatherTrait Factionleader > 0
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order

    Affects SonofKingPrince  1  Chance  100

;------------------------------------------
Trigger grandsonofkingprince
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonofKingPrince > 0
        and not FatherTrait Factionleader > 0
        and not FatherTrait Factionheir > 0
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order

    Affects SonofKingPrince  1  Chance  100

;------------------------------------------
Trigger grandsonofkingprince_a
    WhenToTest CharacterTurnEnd

    Condition FatherTrait Factionleader = 1
        and I_TurnNumber < 1
	and not FactionType papal_states
	and not FactionType knights_templar
	and not FactionType teutonic_order

    Affects SonofKingPrince  1  Chance 100

;------------------------------------------
Trigger granddaughterofprince
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Factionleader > 0
          and not FatherTrait Factionheir > 0
          and AgentType = princess

    Affects DaughterofKingPrince  1  Chance  100

;------------------------------------------
Trigger granddaughterofking
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Factionheir > 0
          and not FatherTrait Factionleader > 0
          and AgentType = princess

    Affects DaughterofKingPrince  1  Chance  100

;------------------------------------------
Trigger granddaughterofkingprince
    WhenToTest CharacterComesOfAge

    Condition FatherTrait WifeIsDaughterofKingPrince > 0

    Affects SonofKingPrince  1  Chance  100

;------------------------------------------
Trigger granddaughterofkingprince_a
    WhenToTest CharacterTurnEnd

    Condition FatherTrait Factionleader = 1
          and I_TurnNumber < 1
          and AgentType = princess

    Affects DaughterofKingPrince  1  Chance 100

;------------------------------------------
Trigger Love_or_Hate_dad
    WhenToTest CharacterComesOfAge

    Affects Loves_Father 1  Chance  10 
    Affects Hates_Father 1  Chance  10

;------------------------------------------
Trigger Badblood_inheritance
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and FatherTrait Disobedient >= 1
    and not Trait Badblood > 0
    and not Trait Disobedient >= 1 ;if already a traitor what is the point?

    Affects Badblood 1 Chance  100

;=== Poulains Triggers ====================
;------------------------------------------
Trigger european_birth_in_jerusalem
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 183 Jerusalem_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_acre
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 180 Acre_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_antioch
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 158 Antioch_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_damascus
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 170 Damascus_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_aleppo
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 151 Aleppo_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_gaza
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 191 Gaza_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_baghdad
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 168 Baghdad_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_edessa
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 156 Edessa_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100

;------------------------------------------
Trigger european_birth_in_Mecca
    WhenToTest CharacterComesOfAge

    Condition IsRegionOneOf 198 Mecca_Province
    and not FactionType lithuania
    and not FactionType cumans

    Affects Poulains  1  Chance  100 

;*********  KINGDOM BONUSES TRIGGERS  ********* 
;------------------------------------------
Trigger rulerofsicilyissicily
    WhenToTest CharacterTurnEnd

    Condition FactionType sicily 
    and IsFactionLeader
          and I_SettlementOwner Palermo = sicily
          and I_SettlementOwner Naples = sicily

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisengland
    WhenToTest CharacterTurnEnd

    Condition FactionType england 
    and IsFactionLeader
          and I_SettlementOwner Palermo = england
          and I_SettlementOwner Naples = england

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisfrance
    WhenToTest CharacterTurnEnd

    Condition FactionType france 
    and IsFactionLeader
          and I_SettlementOwner Palermo = france
          and I_SettlementOwner Naples = france

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyishre
    WhenToTest CharacterTurnEnd

    Condition FactionType hre 
    and IsFactionLeader
          and I_SettlementOwner Palermo = hre
          and I_SettlementOwner Naples = hre

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisspain
    WhenToTest CharacterTurnEnd

    Condition FactionType spain 
    and IsFactionLeader
          and I_SettlementOwner Palermo = spain
          and I_SettlementOwner Naples = spain

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisbyzantium
    WhenToTest CharacterTurnEnd

    Condition FactionType byzantium 
    and IsFactionLeader
          and I_SettlementOwner Palermo = byzantium
          and I_SettlementOwner Naples = byzantium

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisrussia
    WhenToTest CharacterTurnEnd

    Condition FactionType russia 
    and IsFactionLeader
          and I_SettlementOwner Palermo = russia
          and I_SettlementOwner Naples = russia

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyismoors
    WhenToTest CharacterTurnEnd

    Condition FactionType moors 
    and IsFactionLeader
          and I_SettlementOwner Palermo = moors
          and I_SettlementOwner Naples = moors

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisturks
    WhenToTest CharacterTurnEnd

    Condition FactionType turks 
    and IsFactionLeader
          and I_SettlementOwner Palermo = turks
          and I_SettlementOwner Naples = turks

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisegypt
    WhenToTest CharacterTurnEnd

    Condition FactionType egypt 
    and IsFactionLeader
          and I_SettlementOwner Palermo = egypt
          and I_SettlementOwner Naples = egypt

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisdenmark
    WhenToTest CharacterTurnEnd

    Condition FactionType denmark 
    and IsFactionLeader
          and I_SettlementOwner Palermo = denmark
          and I_SettlementOwner Naples = denmark

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyispoland
    WhenToTest CharacterTurnEnd

    Condition FactionType poland 
    and IsFactionLeader
          and I_SettlementOwner Palermo = poland
          and I_SettlementOwner Naples = poland

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyishungary
    WhenToTest CharacterTurnEnd

    Condition FactionType hungary 
    and IsFactionLeader
          and I_SettlementOwner Palermo = hungary
          and I_SettlementOwner Naples = hungary

    Affects RulerofSicily  1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotsicily
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType sicily 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = sicily

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotengland
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType england 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = sicily

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotfrance
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType france 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = sicily

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnothre
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType hre 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = hre

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotspain
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType spain 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = spain

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotbyzantium
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType byzantium 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = byzantium

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotrussia
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType russia 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = russia

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotmoors
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType moors 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = moors

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotturks
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType turks 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = turks

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotegypt
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType egypt 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = egypt

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotdenmark
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType denmark 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = denmark

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnotpoland
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType poland 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = poland

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilyisnothungary
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and FactionType hungary 
          and Trait RulerofSicily = 1
          and not I_SettlementOwner Palermo = hungary

    Affects RulerofSicily  -1  Chance  100

;------------------------------------------
Trigger rulerofsicilybonus
    WhenToTest CharacterTurnEnd

    Condition AgentType = admiral
          and FactionLeaderTrait RulerofSicily = 1
	  and Attribute Command >= 1
          and Trait RulerofSicilyBonus = 0

    Affects RulerofSicilyBonus  1  Chance  25 

;*********  EDUCATION TRIGGERS  *********
;--------------------------------------------
Trigger Start_edu_count
    WhenToTest CharacterComesOfAge

    Condition IsGeneral

    Affects Wantschool 6 Chance 100

;--------------------------------------------
Trigger Military_birth_nonpagan
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and not FactionType cumans
          and not FactionType lithuania 
          and not FactionType knights_templar
          and not FactionType teutonic_order

    Affects MilitaryInclination 1 Chance 40

;--------------------------------------------
Trigger Military_birth_cuman
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionType cumans

    Affects MilitaryInclination 1 Chance 70

;--------------------------------------------
Trigger Military_birth_lithuania
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionType lithuania  

    Affects MilitaryInclination 1 Chance 70

;--------------------------------------------
Trigger Military_birth_templars
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionType knights_templar  

    Affects MilitaryInclination 1 Chance 70

;--------------------------------------------
Trigger Military_birth_teutonic
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionType teutonic_order  

    Affects MilitaryInclination 1 Chance 70

;--------------------------------------------
Trigger Governor_birth
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and not Trait MilitaryInclination = 1

    Affects GovernorInclination 1 Chance 100

;--------------------------------------------
Trigger Edu_timer
    WhenToTest CharacterTurnStart

    Condition Trait Wantschool > 0
    and IsGeneral

    Affects Wantschool -1 Chance 100

;--------------------------------------------
Trigger Scholar_birth
    WhenToTest CharacterComesOfAge

    Condition IsGeneral

    Affects WantsHigherEd 1 Chance 3

;--------------------------------------------
Trigger Scholar_birth_father
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and FatherTrait WantsHigherEd = 1 

    Affects WantsHigherEd 1 Chance 10

;--------------------------------------------
Trigger Scholar_birth_intelligent
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and Trait Intelligent >= 2

    Affects WantsHigherEd 1 Chance 5

;--------------------------------------------
Trigger Inspiring_teacher
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and HasAncType GreatAcademic

    Affects AncillaryTeacher 1 Chance 100

;--------------------------------------------
Trigger Inspiring_teacher_western
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and CharacterReligion catholic
    and FatherTrait AncillaryTeacher >= 1 

    Affects Western_Edu 1 Chance 100

;--------------------------------------------
Trigger Inspiring_teacher_eastern
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and CharacterReligion islam
    and FatherTrait AncillaryTeacher >= 1 

    Affects Eastern_Edu 1 Chance 100

;--------------------------------------------
;eg aristole trains alexanda
Trigger Inspiring_teacher_greek
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and CharacterReligion orthodox
    and FatherTrait AncillaryTeacher >= 1 

    Affects Greek_Edu 1 Chance 100

;--------------------------------------------
Trigger Military_Edu_castle1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and not FactionType cumans
    and not FactionType lithuania  
    and Trait Wantschool >= 1
    and SettlementBuildingExists = wooden_castle

    Affects Military_Edu 1 Chance 25

;--------------------------------------------
Trigger Military_Edu_castle2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool >= 1
    and not FactionType cumans
    and not FactionType lithuania 
    and SettlementBuildingExists >= castle

    Affects Military_Edu 1 Chance 33

;--------------------------------------------
Trigger Military_Edu_castle_secondary1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool >= 1
    and Trait Military_Edu >= 1

    Affects Energetic 1 Chance 10
    Affects HaleAndHearty 3 Chance 10
    Affects NaturalMilitarySkill 1 Chance 3
    Affects Brave 1 Chance 5

;--------------------------------------------
Trigger Military_Edu_castle_secondary2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool >= 1
    and Trait Military_Edu >= 1

    Affects GoodInfantryGeneral 1 Chance 10
    Affects BadInfantryGeneral 1 Chance 10
    Affects GoodCavalryGeneral 1 Chance 10
    Affects BadCavalryGeneral 1 Chance 10

;--------------------------------------------
Trigger Military_Edu_castle_secondary3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool >= 1
    and Trait Military_Edu >= 1

    Affects Drink 1 Chance 5
    Affects Feck 1 Chance 5
    Affects Arse 1 Chance 1
    Affects Girls 1 Chance 5

;--------------------------------------------
Trigger Pagan_Edu_castle1_lithuania
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and FactionType lithuania  
    and Trait Wantschool >= 1
    and SettlementBuildingExists = c_perkunas_altar

    Affects Pagan_Edu 1 Chance 20

;--------------------------------------------
Trigger Pagan_Edu_city1_lithuania
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool >= 1
    and FactionType lithuania 
    and SettlementBuildingExists >= perkunas_altar

    Affects Pagan_Edu 1 Chance 20

;------------------------------------------
Trigger Pagan_Edu_inwild_lithuania
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and not EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and not InEnemyLands
    and FactionType lithuania 

    Affects Pagan_Edu 1 Chance 20

;--------------------------------------------
Trigger Pagan_Edu_castle1_cuman
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and FactionType cumans
    and Trait Wantschool >= 1
    and SettlementBuildingExists = c_tengir_altar

    Affects Pagan_Edu 1 Chance 33

;--------------------------------------------
Trigger Pagan_Edu_city1_cuman
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool >= 1
    and FactionType cumans 
    and SettlementBuildingExists >= tengir_altar

    Affects Pagan_Edu 1 Chance 20

;------------------------------------------
Trigger Pagan_Edu_inwild_cuman
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and not EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and not InEnemyLands
    and FactionType cumans 

    Affects Pagan_Edu 1 Chance 33

;--------------------------------------------
Trigger Pagan_Edu_castle_secondary1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and SettlementBuildingExists >= wooden_castle
    and Trait Wantschool >= 1
    and Trait Pagan_Edu >= 1

    Affects Energetic 1 Chance 10
    Affects HaleAndHearty 3 Chance 10
    Affects NaturalMilitarySkill 1 Chance 3
    Affects Brave 1 Chance 5

;--------------------------------------------
Trigger Pagan_Edu_castle_secondary2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and SettlementBuildingExists >= wooden_castle
    and Trait Wantschool >= 1
    and Trait Pagan_Edu >= 1

    Affects GoodCavalryGeneral 1 Chance 10
    Affects BadCavalryGeneral 1 Chance 10
    Affects Hatescatholic 1 Chance 10
    Affects Superstitious 1 Chance 3

;--------------------------------------------
Trigger Pagan_Edu_castle_secondary3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and SettlementBuildingExists >= wooden_castle
    and Trait Wantschool >= 1
    and Trait Pagan_Edu >= 1

    Affects Drink 1 Chance 10
    Affects Feck 1 Chance 10
    Affects Girls 1 Chance 5

;--------------------------------------------
Trigger Western_Edu_school
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Western_Edu < 1
    and SettlementBuildingExists = school

    Affects Western_Edu 1 Chance 25

;--------------------------------------------
Trigger Western_Edu_school_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Western_Edu <= 2
    and SettlementBuildingExists = school
    and SettlementBuildingExists >= library

    Affects Western_Edu 1 Chance 33

;--------------------------------------------
Trigger Western_Edu_university
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Western_Edu < 4
    and SettlementBuildingExists = university

    Affects Western_Edu 1 Chance 33

;--------------------------------------------
Trigger Western_Edu_university_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Western_Edu < 4
    and SettlementBuildingExists = university
    and SettlementBuildingExists >= library

    Affects Western_Edu 1 Chance 50

;--------------------------------------------
Trigger Western_Edu_greatuniversity
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Western_Edu < 4
    and SettlementBuildingExists > university

    Affects Western_Edu 1 Chance 50

;--------------------------------------------
Trigger Western_Edu_greatuniversity_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Western_Edu < 4
    and SettlementBuildingExists > university
    and SettlementBuildingExists >= library

    Affects Western_Edu 1 Chance 75

;--------------------------------------------
Trigger Western_Edu_secondary
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and Trait Wantschool >= 1
    and Trait Western_Edu >= 1

    Affects Drink 1 Chance 15
    Affects Girls 1 Chance 10
    Affects InspiringSpeaker 1 Chance 10
    Affects BoringSpeaker 1 Chance 10
    Affects Intelligent 1 Chance 10
    Affects Rabblerouser 1 Chance 20

;--------------------------------------------
Trigger Eastern_Edu_school
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Eastern_Edu < 1
    and SettlementBuildingExists = school

    Affects Eastern_Edu 1 Chance 33

;--------------------------------------------
Trigger Eastern_Edu_school_libary
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Eastern_Edu <= 2
    and SettlementBuildingExists = school
    and SettlementBuildingExists >= library

    Affects Eastern_Edu 1 Chance 33

;--------------------------------------------
Trigger Eastern_Edu_university
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Eastern_Edu < 4
    and SettlementBuildingExists = university

    Affects Eastern_Edu 1 Chance 33

;--------------------------------------------
Trigger Eastern_Edu_university_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Eastern_Edu < 4
    and SettlementBuildingExists = university
    and SettlementBuildingExists >= library

    Affects Eastern_Edu 1 Chance 50

;--------------------------------------------
Trigger Eastern_Edu_greatuniversity
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Eastern_Edu < 4
    and SettlementBuildingExists > university

    Affects Eastern_Edu 1 Chance 50

;--------------------------------------------
Trigger Eastern_Edu_greatuniversity_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Eastern_Edu < 4
    and SettlementBuildingExists > university
    and SettlementBuildingExists >= library

    Affects Eastern_Edu 1 Chance 75

;--------------------------------------------
Trigger Eastern_Edu_secondary
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and Trait Wantschool >= 1
    and Trait Eastern_Edu >= 1

    Affects Drink 1 Chance 10
    Affects Girls 1 Chance 5
    Affects InspiringSpeaker 1 Chance 10
    Affects BoringSpeaker 1 Chance 10
    Affects Intelligent 1 Chance 10
    Affects PublicFaith 1 Chance 15

;--------------------------------------------
Trigger Medical_Skill_Edu
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and SettlementBuildingExists >= bimaristan

    Affects MedicalSkill 1 Chance 10

;--------------------------------------------
Trigger Greek_Edu_school
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Greek_Edu < 1
    and SettlementBuildingExists = school

    Affects Greek_Edu 1 Chance 33

;--------------------------------------------
Trigger Greek_Edu_school_libary
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Greek_Edu <= 2
    and SettlementBuildingExists = school
    and SettlementBuildingExists >= library

    Affects Greek_Edu 1 Chance 33

;--------------------------------------------
Trigger Greek_Edu_university
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Greek_Edu < 4
    and SettlementBuildingExists = university

    Affects Greek_Edu 1 Chance 33

;--------------------------------------------
Trigger Greek_Edu_university_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Greek_Edu < 4
    and SettlementBuildingExists = university
    and SettlementBuildingExists >= library

    Affects Greek_Edu 1 Chance 50

;--------------------------------------------
Trigger Greek_Edu_greatuniversity
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Greek_Edu < 4
    and SettlementBuildingExists > university

    Affects Greek_Edu 1 Chance 50

;--------------------------------------------
Trigger Greek_Edu_greatuniversity_library
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool >= 1
    and Trait Greek_Edu < 4
    and SettlementBuildingExists > university
    and SettlementBuildingExists >= library

    Affects Greek_Edu 1 Chance 75

;--------------------------------------------
Trigger Greek_Edu_secondary
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and Trait Wantschool >= 1
    and Trait Greek_Edu >= 1

    Affects Drink 1 Chance 15
    Affects Girls 1 Chance 10
    Affects InspiringSpeaker 1 Chance 15
    Affects BoringSpeaker 1 Chance 15
    Affects Intelligent 1 Chance 10
    Affects Rabblerouser 1 Chance 10

;------ Guild Buildings add to Education --------
;--------------------------------------------
Trigger Education_Guild_Assassins
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_assassins_guild

    Affects HarshJustice 1 Chance 20
    Affects Paranoia 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Eastern_Assassins
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_eastern_assassins_guild

    Affects HarshJustice 1 Chance 20
    Affects Paranoia 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Masons
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_masons_guild

    Affects GoodBuilder 6 Chance 20
    Affects Corrupt 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Theologians
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_theologians_guild

    Affects PublicFaith 1 Chance 20
    Affects PublicAtheism 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Merchants
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_merchants_guild

    Affects GoodTrader 12 Chance 20
    Affects Embezzler 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Hanseatic
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= hanseatic_guild

    Affects GoodTrader 12 Chance 20
    Affects Embezzler 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Alchemists
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_alchemists_guild

    Affects Intelligent 1 Chance 20
    Affects BoringSpeaker 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Thieves
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_thieves_guild

    Affects HighPersonalSecurity 1 Chance 20
    Affects Liar 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Explorers
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_explorers_guild

    Affects Energetic 1 Chance 20
    Affects Girls 2 Chance 10

;--------------------------------------------
Trigger Education_Guild_Swordsmiths
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_swordsmiths_guild

    Affects NaturalMilitarySkill 1 Chance 20
    Affects Feck 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Woodsmens
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_woodsmens_guild

    Affects Scout 1 Chance 20
    Affects Ignorance 1 Chance 10

;--------------------------------------------
Trigger Education_Guild_Horsebreeders
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and EndedInSettlement
    and Trait Wantschool = 1
    and SettlementBuildingExists >= school
    and SettlementBuildingExists >= m_horse_breeders_guild

    Affects GoodCavalryGeneral 1 Chance 20
    Affects Gambling 1 Chance 10

;======= Education - Adoption and Marriage ========
;--------------------------------------------
Trigger Military_Adoption
    WhenToTest OfferedForAdoption

    Condition not FactionReligion pagan

    Affects MilitaryInclination 1 Chance 40

;--------------------------------------------
Trigger Military_Adoption_pagan
    WhenToTest OfferedForAdoption

    Condition FactionReligion pagan

    Affects MilitaryInclination 1 Chance 70

;--------------------------------------------
Trigger Governor_Adoption
    WhenToTest OfferedForAdoption

    Condition not Trait MilitaryInclination = 1

    Affects GovernorInclination 1 Chance 100

;------------------------------------------
Trigger Worthy_Of_Adoption_Military_Ed
    WhenToTest OfferedForAdoption

    Condition Trait MilitaryInclination = 1 
    and not FactionReligion pagan

    Affects Military_Edu 1  Chance  50 
    Affects Military_Edu 1  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Adoption_Military_Ed_pagan
    WhenToTest OfferedForAdoption

    Condition Trait MilitaryInclination = 1 
    and FactionReligion pagan

    Affects Pagan_Edu 1  Chance  50 
    Affects Pagan_Edu 1  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Adoption_WantsHighEd
    WhenToTest OfferedForAdoption

    Affects WantsHigherEd 1  Chance  10 

;------------------------------------------
Trigger Worthy_Of_Adoption_Western_Ed
    WhenToTest OfferedForAdoption

    Condition CharacterReligion catholic
    and Trait GovernorInclination = 1 

    Affects Western_Edu  1  Chance  50

;------------------------------------------
Trigger Worthy_Of_Adoption_Eastern_Ed
    WhenToTest OfferedForAdoption

    Condition CharacterReligion islam
    and Trait GovernorInclination = 1 

    Affects Eastern_Edu  1  Chance  50

;------------------------------------------
Trigger Worthy_Of_Adoption_Greek_Ed
    WhenToTest OfferedForAdoption

    Condition CharacterReligion orthodox
    and Trait GovernorInclination = 1 

    Affects Greek_Edu  1  Chance 50

;--------------------------------------------
Trigger Military_Marriage
    WhenToTest OfferedForMarriage

    Condition not FactionReligion pagan

    Affects MilitaryInclination 1 Chance 40

;--------------------------------------------
Trigger Military_Marriage_pagan
    WhenToTest OfferedForMarriage

    Condition FactionReligion pagan

    Affects MilitaryInclination 1 Chance 70

;--------------------------------------------
Trigger Governor_Marriage
    WhenToTest OfferedForMarriage

    Condition not Trait MilitaryInclination = 1

    Affects GovernorInclination 1 Chance 100

;------------------------------------------
Trigger Worthy_Of_Marriage_Military_Ed
    WhenToTest OfferedForMarriage

    Condition Trait MilitaryInclination = 1 
    and not FactionReligion pagan

    Affects Military_Edu 1  Chance  50 
    Affects Military_Edu 1  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Marriage_Pagan_Ed
    WhenToTest OfferedForMarriage

    Condition Trait MilitaryInclination = 1 
    and FactionReligion pagan

    Affects Pagan_Edu 1  Chance  50 
    Affects Pagan_Edu 1  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Marriage_Western_Ed
    WhenToTest OfferedForMarriage

    Condition CharacterReligion catholic
    and Trait GovernorInclination = 1 

    Affects Western_Edu  1  Chance  75
    Affects Western_Edu  1  Chance  50
    Affects WantsHigherEd 1  Chance  10 

;------------------------------------------
Trigger Worthy_Of_Marriage_Eastern_Ed
    WhenToTest OfferedForMarriage

    Condition CharacterReligion islam
    and Trait GovernorInclination = 1 

    Affects Eastern_Edu  1  Chance  75
    Affects Eastern_Edu  1  Chance  50
    Affects WantsHigherEd 1  Chance  10 

;------------------------------------------
Trigger Worthy_Of_Marriage_Greek_Ed
    WhenToTest OfferedForMarriage

    Condition CharacterReligion orthodox
    and Trait GovernorInclination = 1 

    Affects Greek_Edu  1  Chance  75
    Affects Greek_Edu  1  Chance  50
    Affects WantsHigherEd 1  Chance  10 

;------------------------------------------
Trigger Lesser_General_Adoption_Military_Ed
    WhenToTest LesserGeneralOfferedForAdoption

    Affects MilitaryInclination 1 Chance 100
    Affects Military_Edu 1  Chance  75 
    Affects WantsHigherEd 1  Chance  5 

;========== After School Education =========== 
;--------------------------------------------
Trigger Western_Edu_university_old
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool < 1
    and Trait Western_Edu < 3
    and SettlementBuildingExists >= university

    Affects Western_Edu 1 Chance 5

;--------------------------------------------
Trigger Western_Edu_HighEd
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion catholic
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait WantsHigherEd = 1
    and Trait Western_Edu > 2
    and Trait Western_Edu < 11
    and SettlementBuildingExists >= university
    and SettlementBuildingExists >= library

    Affects Western_Edu 1 Chance 75

;--------------------------------------------
Trigger Eastern_Edu_university_old
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool < 1
    and Trait Eastern_Edu < 4
    and SettlementBuildingExists >= university

    Affects Eastern_Edu 1 Chance 5

;--------------------------------------------
Trigger Eastern_Edu_HighEd
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion islam
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait WantsHigherEd = 1
    and Trait Eastern_Edu > 2
    and Trait Eastern_Edu < 11
    and SettlementBuildingExists >= university
    and SettlementBuildingExists >= library

    Affects Eastern_Edu 1 Chance 75

;--------------------------------------------
Trigger Greek_Edu_university_old
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait Wantschool < 1
    and Trait Greek_Edu < 4
    and SettlementBuildingExists >= university

    Affects Greek_Edu 1 Chance 5

;--------------------------------------------
Trigger Greek_Edu_HighEd
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and CharacterReligion orthodox
    and EndedInSettlement
    and RemainingMPPercentage = 100
    and Trait WantsHigherEd = 1
    and Trait Greek_Edu > 2
    and Trait Greek_Edu < 11
    and SettlementBuildingExists >= university
    and SettlementBuildingExists >= library

    Affects Greek_Edu 1 Chance 75

;--------------------------------------------
Trigger Sitting_Around_Town_Education
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and EndedInSettlement
        and RemainingMPPercentage = 100
        and SettlementBuildingExists >= school
        and SettlementBuildingExists >= library
	and Trait Wantschool < 1

    Affects MathematicsSkill 1 Chance 3
    Affects Intelligent 1 Chance 3

;=============  Ai_Move TRIGGERS  ============ 
;------------------------------------------
;Trigger Ai_MoveFix1_Add
;    WhenToTest CharacterTurnEnd
;
;    Condition not FactionIsLocal
;	and not EndedInSettlement
;	and RemainingMPPercentage = 100
;        and Trait Ai_MoveFix < 1
;
;    Affects Ai_MoveFix 1  Chance  100 
;
;------------------------------------------
;Trigger Ai_MoveFix1_Remove
;    WhenToTest CharacterTurnEnd
;
;    Condition not FactionIsLocal
;	and RemainingMPPercentage < 100
;        and Trait Ai_MoveFix = 1
;
;    Affects Ai_MoveFix -1  Chance  100 
;
;------------------------------------------
Trigger Ai_MoveFix1_Remove_Human
    WhenToTest CharacterTurnEnd

    Condition FactionIsLocal
        and Trait Ai_MoveFix = 1

    Affects Ai_MoveFix -1  Chance  100 
;added for bgr
;------------------------------------------
Trigger Ai_MoveFix1_Remove_IfMoved
    WhenToTest CharacterTurnEnd

    Condition not FactionIsLocal
	and RemainingMPPercentage < 95
        and Trait Ai_MoveFix = 1
	and TimeInRegion < 2

    Affects Ai_MoveFix -1  Chance  100 
;altered for bgr
;------------------------------------------
Trigger Ai_MoveFix1_Remove_Homeland
    WhenToTest CharacterTurnEnd

    Condition not FactionIsLocal
	and not InEnemyLands
        and Trait Ai_MoveFix = 1

    Affects Ai_MoveFix -1  Chance  100 
;altered for bgr
;------------------------------------------
Trigger Ai_MoveFix1_Remove_Besieging
    WhenToTest CharacterTurnEnd

    Condition not FactionIsLocal
        and IsBesieging
        and Trait Ai_MoveFix = 1

    Affects Ai_MoveFix -1  Chance  100 
;altered for bgr
;------------------------------------------
Trigger Ai_MoveFix1_Remove_Battle
    WhenToTest PostBattle

    Condition not FactionIsLocal
        and Trait Ai_MoveFix = 1

    Affects Ai_MoveFix -1  Chance  100 
;altered for bgr
;------------------------------------------
Trigger Ai_MoveFix1_Add_Outside_NotMoved
    WhenToTest CharacterTurnEnd

    Condition not FactionIsLocal
	and not EndedInSettlement
	and TimeInRegion > 1
	and RemainingMPPercentage >= 95
        and Trait Ai_MoveFix < 1
        and not IsBesieging

    Affects Ai_MoveFix 1  Chance  100 
;altered for bgr
;------------------------------------------
Trigger Ai_MoveFix1_Add_TimeinRegion3EnemyLands
    WhenToTest CharacterTurnEnd

    Condition not FactionIsLocal
	and InEnemyLands
	and TimeInRegion > 2
        and Trait Ai_MoveFix < 1
        and not IsBesieging

    Affects Ai_MoveFix 1  Chance  100 
;altered for bgr
;------------------------------------------
;=============  MILITARISTIC TRIGGERS  ============ 
;------------------------------------------
Trigger StandardBattle_AnyVictory_MilitaryInclination
    WhenToTest PostBattle

    Condition IsGeneral
    and WonBattle
    and BattleOdds < 2.1
    and Trait MilitaryInclination = 1

    Affects GoodCommander  1  Chance  40 

;------------------------------------------
Trigger StandardBattle_AnyVictory_NotMilitaryInclination
    WhenToTest PostBattle

    Condition IsGeneral
    and WonBattle
    and BattleOdds < 2.1
    and not Trait MilitaryInclination = 1

    Affects GoodCommander  1  Chance  20 

;------------------------------------------
Trigger StandardBattle_ClearVictory
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess = clear
          and I_ConflictType Normal
          and BattleOdds < 1.75

    Affects GoodCommander 1  Chance  50 
    Affects Military_Edu  1  Chance  5

;------------------------------------------
Trigger StandardBattle_CrushingVictory
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds < 1.51

    Affects GoodCommander 1  Chance  85 
    Affects Military_Edu  1  Chance  15

;------------------------------------------
Trigger Battle_HeroicBattleCommander
    WhenToTest PostBattle

    Condition IsGeneral
        and WonBattle
        and PercentageEnemyKilled > 25
	and BattleOdds < 0.51

    Affects GoodCommander 1 Chance 100
    Affects GoodCommander 1 Chance 75
    Affects Military_Edu  1  Chance 20 

;------------------------------------------
Trigger Battle_Ambush
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and I_ConflictType SuccessfulAmbush
          and BattleOdds < 1.51

    Affects GoodCommander 1  Chance  25 
    Affects Military_Edu  1  Chance  50

;------------------------------------------
Trigger Battle_WiseTacticalCommander
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess > close
          and BattleOdds > 0.70
          and BattleOdds < 1.50
          and PercentageOfArmyKilled < 20

    Affects Military_Edu 1 Chance 80

;------------------------------------------
Trigger Battle_BrilliantTacticalCommander
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess > close
          and BattleOdds < 0.70
          and PercentageOfArmyKilled < 20

    Affects Military_Edu 1 Chance 80
    Affects GoodCommander 1 Chance 60

;------------------------------------------
Trigger Battle_Siege_Won_MilitaryInclination
    WhenToTest PostBattle

    Condition IsGeneral
    and WonBattle
    and BattleSuccess > average
    and I_ConflictType Siege
    and BattleOdds < 1.75
    and Trait MilitaryInclination = 1

    Affects GoodCommander 1  Chance  40 

;------------------------------------------
Trigger Battle_Siege_Won_NotMilitaryInclination
    WhenToTest PostBattle

    Condition IsGeneral
    and WonBattle
    and BattleSuccess > average
    and I_ConflictType Siege
    and BattleOdds < 1.75
    and not Trait MilitaryInclination = 1

    Affects GoodCommander 1  Chance  20 

;------------------------------------------
Trigger Building_MilitaryInclination_City
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished > city_watch

    Affects GoodCommander  1  Chance  25
    Affects Military_Edu 1 Chance 10 

;------------------------------------------
Trigger Building_MilitaryInclination_Castle_Barracks
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished > mustering_hall
    and Trait MilitaryInclination = 1

    Affects GoodCommander  1  Chance  33
    Affects Military_Edu 1 Chance 10 

;------------------------------------------
Trigger Building_MilitaryInclination_Castle_Archery
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished > bowyer
    and Trait MilitaryInclination = 1

    Affects GoodCommander  1  Chance  20
    Affects Military_Edu 1 Chance 8 

;------------------------------------------
Trigger Building_MilitaryInclination_Castle_Archery
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished > stables
    and Trait MilitaryInclination = 1

    Affects GoodCommander  1  Chance  20
    Affects Military_Edu 1 Chance 8 

;------------------------------------------
Trigger StandardBattle_AnyLoss_Trigger
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleOdds > 1.0

    Affects BadCommander  1  Chance  33 

;------------------------------------------
;Trigger CrappyBattleCommander
;    WhenToTest PostBattle
;
;    Condition IsGeneral
;          and not WonBattle
;          and PercentageOfArmyKilled > 25
;          and BattleOdds > 2.00
;
;    Affects BadCommander 2 Chance 75
;
;------------------------------------------
Trigger Battle_Siege_Lost
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Siege
          and BattleOdds > 0.8

    Affects BadCommander 1  Chance  85 

;------------------------------------------
Trigger Withdraws
    WhenToTest PreBattleWithdrawal

    Condition WasAttacker

    Affects BadCommander  1  Chance  85 

;------------------------------------------
Trigger V0190_Withdraw_Before_Battle_Even_Odds_VnV_Trigger
    WhenToTest PreBattleWithdrawal

    Condition IsGeneral
          and I_WithdrawsBeforeBattle
          and BattleOdds > 0.5
          and BattleOdds < 1.75

    Affects BadCommander  1  Chance  33 

;--------------------------------------------
Trigger Possible_Philosophical_Reflection_On_War
    WhenToTest PostBattle

    Condition IsGeneral
    and GeneralFoughtInCombat
    and PercentageBodyguardKilled > 40

    Affects Humane 1 Chance  5

;--------------------------------------------
Trigger General_Takes_Life_Loses_Friends_For_Nothing
    WhenToTest PostBattle

    Condition IsGeneral
    and not WonBattle
    and GeneralNumKillsInBattle > 0
    and PercentageBodyguardKilled > 25

    Affects Humane 1 Chance  10

;--------------------------------------------
Trigger Possible_Philosophical_Reflection_On_War2
    WhenToTest PostBattle

    Condition IsGeneral
    and GeneralFoughtInCombat
    and PercentageBodyguardKilled > 40
    and PercentageEnemyKilled > 50

    Affects Hardened 1 Chance  10

;--------------------------------------------
Trigger General_Takes_Life_Loses_Friends_For_Nothing2
    WhenToTest PostBattle

    Condition IsGeneral
    and not WonBattle
    and GeneralNumKillsInBattle > 0
    and PercentageBodyguardKilled > 25

    Affects Hardened 1 Chance  10

;------------------------------------------
Trigger Insane_From_Wars
    WhenToTest CharacterTurnEnd

    Condition Trait Hardened >= 2

    Affects Deranged  1  Chance  1

;------------------------------------------
;SEVERELY WOUNDED TRIGGERS
Trigger Battle_General_Took_Heavy_Hits 
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.4
	and GeneralHPLostRatioinBattle <= 0.6
	and BattleOdds <= 5

    Affects SeverelyWounded  1  Chance  4

;------------------------------------------
Trigger Battle_General_Took_Severe_Hits
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.6
	and GeneralHPLostRatioinBattle <= 0.8
	and BattleOdds <= 5

    Affects SeverelyWounded  1  Chance  10

;------------------------------------------
Trigger Battle_General_Took_Deadly_Hits
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.8
	and BattleOdds <= 5

    Affects SeverelyWounded  1  Chance  20

;------------------------------------------
Trigger SeverelyWoundedDeterminedRemoveHealth
    WhenToTest PostBattle

    Condition Trait SeverelyWounded = 1
        and Trait HaleAndHearty > 3
	and BattleOdds <= 5

    Affects HaleAndHearty  -1  Chance  75

;------------------------------------------
Trigger SevereWoundsHealedInWild
    WhenToTest CharacterTurnEnd

    Condition Trait SeverelyWounded = 1
          and not EndedInSettlement          

    Affects SeverelyWounded  -1  Chance  50

;------------------------------------------
Trigger SevereWoundsHealedInTown
    WhenToTest CharacterTurnEnd

    Condition Trait SeverelyWounded = 1
          and EndedInSettlement          

    Affects SeverelyWounded  -1  Chance  90

;*********  MISC TRAITS TRIGGERS  ********* 
;*********************Faction - leader/heir/Regent/FutureRegent

;------------------------------------------
Trigger rank_upgrade_TO
    WhenToTest GeneralCaptureSettlement

    Condition FactionType teutonic_order
        and not IsFactionLeader
        and not IsFactionHeir
	and Trait MinorRanksTO < 6

    Affects MinorRanksTO  1  Chance  50 

;------------------------------------------
Trigger becomesheir_TO
    WhenToTest BecomesFactionHeir

    Condition FactionType teutonic_order

    Affects FactionheirTO  1  Chance  100 
    Affects MinorRanksTO -5  Chance  100 

;------------------------------------------
Trigger factionleader_TO
    WhenToTest BecomesFactionLeader

    Condition FactionType teutonic_order

    Affects FactionleaderTO  1  Chance  100 
    Affects FactionheirTO -1  Chance  100 

;------------------------------------------
Trigger rank_upgrade_Templars
    WhenToTest GeneralCaptureSettlement

    Condition FactionType knights_templar
        and not IsFactionLeader
        and not IsFactionHeir
	and Trait MinorRanksTemplars < 6

    Affects MinorRanksTemplars  1  Chance  50 

;------------------------------------------
Trigger becomesheir_Templars
    WhenToTest BecomesFactionHeir

    Condition FactionType knights_templar

    Affects FactionheirTemplars  1  Chance  100 
    Affects MinorRanksTemplars -5  Chance  100 

;------------------------------------------
Trigger factionleader_Templar
    WhenToTest BecomesFactionLeader

    Condition FactionType knights_templar

    Affects FactionleaderTemplars  1  Chance  100 
    Affects FactionheirTemplars -1  Chance  100 

;------------------------------------------
Trigger factionleader_normalfactions
    WhenToTest BecomesFactionLeader

    Condition not Trait FactionFutureRegent = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionleader  1  Chance  100 

;------------------------------------------
Trigger factionleader_pope
    WhenToTest BecomesFactionLeader

    Condition FactionType papal_states

    Affects IAmPope  1  Chance  100

;------------------------------------------
Trigger reinherited
    WhenToTest BecomesFactionHeir

    Condition Trait Exheir = 1

    Affects Factionheir  1  Chance  100

;------------------------------------------
Trigger disinherited                        
    WhenToTest CeasedFactionHeir

    Condition not Trait Exheir >= 0
        and not IsFactionLeader
        and not Trait FactionRegent >= 0

    Affects Exheir  2  Chance  100

;------------------------------------------
Trigger inherited
    WhenToTest CeasedFactionHeir

    Condition IsFactionLeader
        and not Trait FactionFutureRegent = 1
        and not Trait FactionRegent = 1

    Affects Exheir  1  Chance  100

;------------------------------------------
Trigger inheritedregent
    WhenToTest CeasedFactionHeir

    Condition IsFactionLeader
        and Trait FactionFutureRegent = 1

    Affects Exheir  1  Chance  100

;------------------------------------------
Trigger becomesheirdaddyheir
    WhenToTest BecomesFactionHeir

    Condition Trait BiologicalSon = 1
        and FatherTrait Factionheir = 1 
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger becomesheirdaddyleader
    WhenToTest BecomesFactionHeir

    Condition Trait BiologicalSon = 1
        and FatherTrait Factionleader = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger bastardbecomesheirdaddyheir
    WhenToTest BecomesFactionHeir

    Condition Trait BastardSon = 1
        and FatherTrait Factionheir = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger bastardbecomesheirdaddyleader
    WhenToTest BecomesFactionHeir

    Condition Trait BastardSon = 1
        and FatherTrait Factionleader = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger adoptedbecomesfutureregent
    WhenToTest BecomesFactionHeir

    Condition not Trait BiologicalSon = 1
        and not Trait BastardSon = 1
        and I_TurnNumber > 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects FactionFutureRegent  1  Chance 100

;------------------------------------------
Trigger anybody1becomesfutureregent
    WhenToTest BecomesFactionHeir

    Condition Trait BiologicalSon = 1
        and not FatherTrait Factionleader = 1
        and not FatherTrait FactionRegent = 1
        and not FatherTrait Factionheir = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects FactionFutureRegent  1  Chance 100

;------------------------------------------
Trigger anobody2becomesfutureregent
    WhenToTest BecomesFactionHeir

    Condition Trait BastardSon = 1
        and not FatherTrait Factionleader = 1
        and not FatherTrait FactionRegent = 1
        and not FatherTrait Factionheir = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects FactionFutureRegent  1  Chance 100

;------------------------------------------
Trigger sonofadoptedbecomesheir
    WhenToTest BecomesFactionHeir

    Condition Trait BiologicalSon = 1
        and FatherTrait FactionRegent = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger bastardsonofadoptedbecomesheir
    WhenToTest BecomesFactionHeir

    Condition Trait BastardSon = 1
        and FatherTrait FactionRegent = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger sonofkingprincebecomesheir
    WhenToTest BecomesFactionHeir

    Condition Trait SonofKingPrince = 1
        and Trait Factionheir = 0
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects Factionheir  1  Chance 100

;------------------------------------------
Trigger becomesfactionregent
    WhenToTest BecomesFactionLeader

    Condition Trait FactionFutureRegent = 1
	and not FactionType teutonic_order
	and not FactionType knights_templar

    Affects FactionRegent  1  Chance 100 


;*********  NoHeirYet  ********* 
;------------------------------------------
Trigger EnglishKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType england
    and I_NumberOfHeirs england < 1

    Affects NoHeirYet 1 Chance  10 ; should gain the trait by the tenth year

;------------------------------------------
Trigger FrenchKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType france
    and I_NumberOfHeirs france < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger HREKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType hre
    and I_NumberOfHeirs hre < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger SpanishKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType spain
    and I_NumberOfHeirs spain < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger SicilianKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType sicily
    and I_NumberOfHeirs sicily < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger VenetianKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType venice
    and I_NumberOfHeirs venice < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger MilaneseKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType milan
    and I_NumberOfHeirs milan < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger RomanKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType byzantium
    and I_NumberOfHeirs byzantium < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger RussianKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType russia
    and I_NumberOfHeirs russia < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger MoorsKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType moors
    and I_NumberOfHeirs moors < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger TurksKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType turks
    and I_NumberOfHeirs turks < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger EgyptianKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType egypt
    and I_NumberOfHeirs egypt < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger DanishKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType denmark
    and I_NumberOfHeirs denmark < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger PortugueseKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType portugal
    and I_NumberOfHeirs portugal < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger PolishKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType poland
    and I_NumberOfHeirs poland < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger HungarianKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType hungary
    and I_NumberOfHeirs hungary < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger kievan_rusKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType kievan_rus
    and I_NumberOfHeirs kievan_rus < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger aragonKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType aragon
    and I_NumberOfHeirs aragon < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger timuridsKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType timurids
    and I_NumberOfHeirs timurids < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger norwayKing_NoHeirYet
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType norway	
    and I_NumberOfHeirs norway < 1

    Affects NoHeirYet 1 Chance  10
	
;------------------------------------------
Trigger kwarezmKing_NoHeirYet	
    WhenToTest CharacterTurnEnd	
	
    Condition IsFactionLeader	
    and FactionType kwarezm	
    and I_NumberOfHeirs kwarezm < 1

    Affects NoHeirYet 1 Chance  10

;------------------------------------------
Trigger EnglishKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType england
    and I_NumberOfHeirs england > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger FrenchKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType france
    and I_NumberOfHeirs france > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger HREKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType hre
    and I_NumberOfHeirs hre > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger SpanishKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType spain
    and I_NumberOfHeirs spain > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger VenetianKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType venice
    and I_NumberOfHeirs venice > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger MilaneseKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType milan
    and I_NumberOfHeirs milan > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger RomanKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType byzantium
    and I_NumberOfHeirs byzantium > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger RussianKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType russia
    and I_NumberOfHeirs russia > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger MoorsKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType moors
    and I_NumberOfHeirs moors > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger TurksKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType turks
    and I_NumberOfHeirs turks > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger EgyptianKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType egypt
    and I_NumberOfHeirs egypt > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger DanishKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType denmark
    and I_NumberOfHeirs denmark > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger PortugueseKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType portugal
    and I_NumberOfHeirs portugal > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger PolishKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType poland
    and I_NumberOfHeirs poland > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger HungarianKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType hungary
    and I_NumberOfHeirs hungary > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger kievan_rusKing_HasHeirNow
    WhenToTest CharacterTurnEnd	

    Condition IsFactionLeader
    and FactionType kievan_rus
    and I_NumberOfHeirs kievan_rus > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger aragonKing_HasHeirNow
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
    and FactionType aragon
    and I_NumberOfHeirs aragon > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger timuridsKing_HasHeirNow
    WhenToTest CharacterTurnEnd	

    Condition IsFactionLeader
    and FactionType timurids
    and I_NumberOfHeirs timurids > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger norwayKing_HasHeirNow
    WhenToTest CharacterTurnEnd	

    Condition IsFactionLeader
    and FactionType norway
    and I_NumberOfHeirs norway > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100

;------------------------------------------
Trigger kwarezmKing_HasHeirNow
    WhenToTest CharacterTurnEnd	

    Condition IsFactionLeader
    and FactionType kwarezm
    and I_NumberOfHeirs kwarezm > 0
    and Trait NoHeirYet = 1

    Affects NoHeirYet -1 Chance  100


;*********  ENVIOUSOFHEIR TRIGGERS  *********
;------------------------------------------
Trigger SonofKing_EnviesHeir
    WhenToTest CharacterTurnEnd

    Condition FatherTrait Factionleader = 1
    and not IsFactionHeir
    and Attribute Loyalty <= 4

    Affects EnviousOfHeir 1 Chance  10

;------------------------------------------
Trigger SonofRegent_EnviesHeir
    WhenToTest CharacterTurnEnd

    Condition FatherTrait FactionRegent = 1
    and not IsFactionHeir
    and Attribute Loyalty <= 4

    Affects EnviousOfHeir 1 Chance  10

;------------------------------------------
Trigger EnviesHeir_NoMore
    WhenToTest CharacterTurnEnd

    Condition Trait EnviousOfHeir = 1
    and Attribute Loyalty >= 5

    Affects EnviousOfHeir -1 Chance  33

;------------------------------------------
Trigger EnviesHeir_IsHeir
    WhenToTest BecomesFactionHeir

    Condition Trait EnviousOfHeir = 1

    Affects EnviousOfHeir -1 Chance  100

;------------------------------------------
Trigger EnviesHeir_IsLeader
    WhenToTest BecomesFactionLeader

    Condition Trait EnviousOfHeir = 1

    Affects EnviousOfHeir -1 Chance  100

;*********  EXCOMMUNICATION TRIGGERS  ********* 
;------------------------------------------
Trigger ExcommunicatedProof           
    WhenToTest CharacterTurnEnd 

    Condition IsFactionLeader
          and FactionExcommunicated
          and not Trait Excommunication >= 1
          and not Trait ExcommunicationJoke >= 1 

    Affects Excommunication 1 Chance 100
    Affects ExcommunicationJoke 2 Chance 33

;------------------------------------------
Trigger ReconciledProof
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and not FactionExcommunicated
          and Trait Excommunication = 1  

    Affects Reconciliation 1 Chance 100

;------------------------------------------
Trigger ReconciledtheJokerProof
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and not FactionExcommunicated
          and Trait ExcommunicationJoke = 1  

    Affects Reconciliation 1 Chance 100

;*********  PNUT'S FIRST BBB TRIGGERS  ********* 
;------------------------------------------
Trigger Visit_Jerusalem
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Jerusalem
    and IsGeneral
    and CharacterReligion catholic
    and not Trait Visit_Jerusalem >= 1
    and not Trait Visit_Jerusalem2 >= 1
          
    Affects Visit_Jerusalem 1 Chance 50

;------------------------------------------
Trigger Visit_Jerusalem_orthodox
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Jerusalem
    and IsGeneral
    and CharacterReligion orthodox
    and not Trait Visit_Jerusalem_orthodox >= 1
          
    Affects Visit_Jerusalem_orthodox 1 Chance 50

;------------------------------------------
Trigger Visit_Jerusalem_islamic
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Jerusalem
    and IsGeneral
    and CharacterReligion islam
    and not Trait Visit_Jerusalem_islamic >= 1
          
    Affects Visit_Jerusalem_islamic 1 Chance 50

;------------------------------------------
Trigger Visit_Rome
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Rome
    and IsGeneral
    and CharacterReligion catholic
    and not Trait Visit_Rome >= 1
          
    Affects Visit_Rome 1 Chance 50

;------------------------------------------
Trigger Visit_Santiago
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Leon
    and IsGeneral
    and CharacterReligion catholic
    and not Trait Visit_Santiago >= 1

    Affects Visit_Santiago 1 Chance 50

;------------------------------------------
Trigger Visit_Constantinople
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Constantinople
    and IsGeneral
    and CharacterReligion orthodox
    and not Trait Visit_Constantinople >= 1

Affects Visit_Constantinople 1 Chance 50

;------------------------------------------
Trigger Visit_Mecca
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Mecca
    and IsGeneral
    and CharacterReligion islam
    and not Trait Visit_Mecca >= 1

    Affects Visit_Mecca 1 Chance  75

;------------------------------------------
Trigger Visit_Jerusalem2
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Jerusalem
    and IsGeneral
    and CharacterReligion catholic
    and not Trait Visit_Jerusalem >= 1
    and not Trait Visit_Jerusalem2 >= 1

    Affects Visit_Jerusalem2 1 Chance 25

;------------------------------------------
Trigger Visit_Medina2
    WhenToTest CharacterTurnEnd
    Condition EndedInSettlement
    and SettlementName Medina
    and IsGeneral
    and CharacterReligion islam
    and not Trait Visit_Medina2 >= 1

    Affects Visit_Medina2 1 Chance 50

;------------------------------------------
Trigger Visit_JerusalemRegion
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 183 Jerusalem_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion catholic
    and not Trait Visit_Jerusalem >= 1
    and not Trait Visit_Jerusalem2 >= 1

    Affects Visit_Jerusalem 1 Chance 50

;------------------------------------------
Trigger Visit_RomeRegion
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 111 Rome_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion catholic
    and not Trait Visit_Rome >= 1

    Affects Visit_Rome 1 Chance 50

;------------------------------------------
Trigger Visit_GaliciaRegion
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 106 Leon_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion catholic
    and not Trait Visit_Santiago >= 1

    Affects Visit_Santiago 1 Chance 50

;------------------------------------------
Trigger Visit_ConstantinopleRegion
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 105 Constantinople_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion orthodox
    and not Trait Visit_Constantinople >= 1

    Affects Visit_Constantinople 1 Chance 50

;------------------------------------------
Trigger Visit_MeccaRegion
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 198 Mecca_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion islam
    and not Trait Visit_Mecca >= 1

    Affects Visit_Mecca 1 Chance  50

;------------------------------------------
Trigger Visit_JerusalemRegion2
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 183 Jerusalem_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion catholic
    and not Trait Visit_Jerusalem >= 1
    and not Trait Visit_Jerusalem2 >= 1

    Affects Visit_Jerusalem2 1 Chance 25

;------------------------------------------
Trigger Visit_MeccaRegion2
    WhenToTest CharacterTurnEnd
    Condition IsRegionOneOf 184 Medina_Province
    and IsGeneral
    and not EndedInEnemyZOC
    and CharacterReligion islam
    and not Trait Visit_Medina2 >= 1

    Affects Visit_Medina2 1 Chance 25

;------------------------------------------
Trigger Rival_Conquer_Constantinople_trigger
    WhenToTest GeneralCaptureSettlement

    Condition SettlementName Constantinople
    and not Trait RivalConquer_Constantinople >= 1
    and not Trait GreekConquer_Constantinople >= 1
    and not Trait RivalConquer_Constantinople1 >= 1
    and not Trait GreekConquer_Constantinople1 >= 1

    Affects RivalConquer_Constantinople  1  Chance  100
    Affects GreekConquer_Constantinople  1  Chance  100

;------------------------------------------
Trigger Rival_Conquer_Constantinople_trigger1
    WhenToTest GeneralCaptureSettlement

    Condition SettlementName Constantinople
    and not Trait RivalConquer_Constantinople1 >= 1
    and not Trait GreekConquer_Constantinople1 >= 1

    Affects RivalConquer_Constantinople1  2  Chance  10
    Affects GreekConquer_Constantinople1  2  Chance  10

;*********  VANQUISHER TRIGGERS  **********
;------------------------------------------
Trigger VanquisherHeathenBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and FactionReligion catholic
          and GeneralFoughtCulture middle_eastern
          and BattleSuccess < crushing

    Affects VanquisherHeathen  1  Chance  100

;------------------------------------------
Trigger VanquisherHeathenHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and FactionReligion catholic
          and GeneralFoughtCulture middle_eastern
          and BattleSuccess = crushing

    Affects VanquisherHeathen  4  Chance  100

;------------------------------------------
Trigger VanquisherHeathenSackedTown
    WhenToTest SackSettlement

    Condition FactionReligion catholic
          and not TargetFactionReligion orthodox
          and not TargetFactionReligion catholic

    Affects VanquisherHeathen  1  Chance  100

;------------------------------------------
Trigger VanquisherHeathenSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition FactionReligion catholic
          and not TargetFactionReligion orthodox
          and not TargetFactionReligion catholic

    Affects VanquisherHeathen  2  Chance  100

;------------------------------------------
Trigger VanquisherHeathenExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition FactionReligion catholic
          and not TargetFactionReligion orthodox
          and not TargetFactionReligion catholic
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherHeathen  1  Chance  100
    Affects BattleDread  1  Chance  100

;------------------------------------------
Trigger VanquisherHeathenBattleVictory2
    WhenToTest PostBattle

    Condition WonBattle
          and FactionReligion islam
          and not GeneralFoughtCulture middle_eastern
          and BattleSuccess < crushing

    Affects VanquisherHeathen  1  Chance  100

;------------------------------------------
Trigger VanquisherHeathenHeroicBattleVictory2
    WhenToTest PostBattle

    Condition WonBattle
          and CharacterReligion islam
          and not GeneralFoughtCulture middle_eastern
          and BattleSuccess = crushing

    Affects VanquisherHeathen  4  Chance  100

;------------------------------------------
Trigger VanquisherHeathenSackedTown2
    WhenToTest SackSettlement

    Condition FactionReligion islam
          and not TargetFactionReligion islam

    Affects VanquisherHeathen  1  Chance  100

;------------------------------------------
Trigger VanquisherHeathenSlaughteredTown2
    WhenToTest ExterminatePopulation

    Condition FactionReligion catholic
          and TargetFactionReligion islam

    Affects VanquisherHeathen  2  Chance  100

;------------------------------------------
Trigger VanquisherHeathenExecutes2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition FactionReligion islam
          and not TargetFactionReligion islam
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherHeathen  1  Chance  100

;------------------------------------------
Trigger VanquisherEnglishBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction england
          and BattleSuccess < crushing

    Affects VanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger VanquisherEnglishHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction england
          and BattleSuccess = crushing

    Affects VanquisherEnglish  4  Chance  100

;------------------------------------------
Trigger VanquisherEnglishSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction england
          and NumKilledGenerals > 0

    Affects VanquisherEnglish  1  Chance  75

;------------------------------------------
Trigger VanquisherEnglishSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType england

    Affects VanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger VanquisherEnglishSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType england

    Affects VanquisherEnglish  2  Chance  100

;------------------------------------------
Trigger VanquisherEnglishExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType england
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger VanquisherEnglishExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType england
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherEnglish  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_england
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements england = 0
          and Trait VanquisherEnglish = 1

    Affects VanquisherEnglish  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_england
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherEnglish = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_england
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherEnglish = 2
          and Trait BastardSon = 1

    Affects SonVanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_england
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherEnglish = 2

    Affects SonVanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_england
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherEnglish = 1

    Affects SonVanquisherEnglish  1  Chance  100

;------------------------------------------
Trigger VanquisherFrenchBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction france
          and BattleSuccess < crushing

    Affects VanquisherFrench  1  Chance  100

;------------------------------------------
Trigger VanquisherFrenchHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction france
          and BattleSuccess = crushing

    Affects VanquisherFrench  4  Chance  100

;------------------------------------------
Trigger VanquisherFrenchSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction france
          and NumKilledGenerals > 0

    Affects VanquisherFrench  1  Chance  75

;------------------------------------------
Trigger VanquisherFrenchSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType france

    Affects VanquisherFrench  1  Chance  100

;------------------------------------------
Trigger VanquisherFrenchSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType france

    Affects VanquisherFrench  2  Chance  100

;------------------------------------------
Trigger VanquisherFrenchExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType france
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherFrench  1  Chance  100

;------------------------------------------
Trigger VanquisherFrenchExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType france
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherFrench  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_france
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements france = 0
          and Trait VanquisherFrench = 1

    Affects VanquisherFrench  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_france
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherFrench = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherFrench  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_france
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherFrench = 2
          and Trait BastardSon = 1

    Affects SonVanquisherFrench  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_france
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherFrench = 2

    Affects SonVanquisherFrench  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_france
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherFrench = 1

    Affects SonVanquisherFrench  1  Chance  100

;------------------------------------------
Trigger VanquisherHREBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction hre
          and BattleSuccess < crushing

    Affects VanquisherHRE  1  Chance  100

;------------------------------------------
Trigger VanquisherHREHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction hre
          and BattleSuccess = crushing

    Affects VanquisherHRE  4  Chance  100

;------------------------------------------
Trigger VanquisherHRESlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction hre
          and NumKilledGenerals > 0

    Affects VanquisherHRE  1  Chance  75

;------------------------------------------
Trigger VanquisherHRESackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType hre

    Affects VanquisherHRE  1  Chance  100

;------------------------------------------
Trigger VanquisherHRESlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType hre

    Affects VanquisherHRE  2  Chance  100

;------------------------------------------
Trigger VanquisherHREExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType hre
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherHRE  1  Chance  100

;------------------------------------------
Trigger VanquisherHREExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType hre
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherHRE  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_HRE
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements hre = 0
          and Trait VendettaHRE = 1

    Affects VanquisherHRE  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_HRE
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherHRE = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherHRE  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_HRE
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherHRE = 2
          and Trait BastardSon = 1

    Affects SonVanquisherHRE  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_HRE
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherHRE = 2

    Affects SonVanquisherHRE  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_hre
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherHRE = 1

    Affects SonVanquisherHRE  1  Chance  100

;------------------------------------------
Trigger VanquisherSpanishBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction spain
          and BattleSuccess < crushing

    Affects VanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger VanquisherSpanishHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction spain
          and BattleSuccess = crushing

    Affects VanquisherSpanish  4  Chance  100

;------------------------------------------
Trigger VanquisherSpanishSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction spain
          and NumKilledGenerals > 0

    Affects VanquisherSpanish  1  Chance  75

;------------------------------------------
Trigger VanquisherSpanishSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType spain

    Affects VanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger VanquisherSpanishSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType spain

    Affects VanquisherSpanish  2  Chance  100

;------------------------------------------
Trigger VanquisherSpanishExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType spain
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger VanquisherSpanishExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType spain
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherSpanish  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Spain
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements spain = 0
          and Trait VanquisherSpanish = 1

    Affects VanquisherSpanish  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Spain
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherSpanish = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Spain
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherSpanish = 2
          and Trait BastardSon = 1

    Affects SonVanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Spain
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherSpanish = 2

    Affects SonVanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Spain
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherSpanish = 1

    Affects SonVanquisherSpanish  1  Chance  100

;------------------------------------------
Trigger VanquisherSicilianBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction sicily
          and BattleSuccess < crushing

    Affects VanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger VanquisherSicilianHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction sicily
          and BattleSuccess = crushing

    Affects VanquisherSicilian  4  Chance  100

;------------------------------------------
Trigger VanquisherSicilianSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction sicily
          and NumKilledGenerals > 0

    Affects VanquisherSicilian  1  Chance  75

;------------------------------------------
Trigger VanquisherSicilianSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType sicily

    Affects VanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger VanquisherSicilianSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType sicily

    Affects VanquisherSicilian  2  Chance  100

;------------------------------------------
Trigger VanquisherSicilianExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType sicily
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger VanquisherSicilianExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType sicily
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherSicilian  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_sicily
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements sicily = 0
          and Trait VanquisherSicilian = 1

    Affects VanquisherSicilian  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_sicily
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherSicilian = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_sicily
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherSicilian = 2
          and Trait BastardSon = 1

    Affects SonVanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_sicily
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherSicilian = 2

    Affects SonVanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_sicily
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherSicilian = 1

    Affects SonVanquisherSicilian  1  Chance  100

;------------------------------------------
Trigger VanquisherScottishBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction scotland
          and BattleSuccess < crushing

    Affects VanquisherScottish  1  Chance  100

;------------------------------------------
Trigger VanquisherScottishHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction scotland
          and BattleSuccess = crushing

    Affects VanquisherScottish  4  Chance  100

;------------------------------------------
Trigger VanquisherScottishSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction scotland
          and NumKilledGenerals > 0

    Affects VanquisherScottish  1  Chance  75

;------------------------------------------
Trigger VanquisherScottishSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType scotland

    Affects VanquisherScottish  1  Chance  100

;------------------------------------------
Trigger VanquisherScottishSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType scotland

    Affects VanquisherScottish  2  Chance  100

;------------------------------------------
Trigger VanquisherScottishExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType scotland
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherScottish  1  Chance  100

;------------------------------------------
Trigger VanquisherScottishExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType scotland
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherScottish  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_scotland
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements scotland = 0
          and Trait VanquisherScottish = 1

    Affects VanquisherScottish  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_scotland
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherScottish = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherScottish  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_scotland
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherScottish = 2
          and Trait BastardSon = 1

    Affects SonVanquisherScottish  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_scotland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherScottish = 2

    Affects SonVanquisherScottish  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_scottish
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherScottish = 1

    Affects SonVanquisherScottish  1  Chance  100

;------------------------------------------
Trigger VanquisherVenetianBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction venice
          and BattleSuccess < crushing

    Affects VanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger VanquisherVenetianHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction venice
          and BattleSuccess = crushing

    Affects VanquisherVenetian  4  Chance  100

;------------------------------------------
Trigger VanquisherVenetianSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction venice
          and NumKilledGenerals > 0

    Affects VanquisherVenetian  1  Chance  75

;------------------------------------------
Trigger VanquisherVenetianSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType venice

    Affects VanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger VanquisherVenetianSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType venice

    Affects VanquisherVenetian  2  Chance  100

;------------------------------------------
Trigger VanquisherVenetianExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType venice
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger VanquisherVenetianExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType venice
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherVenetian  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Venice
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements venice = 0
          and Trait VanquisherVenetian = 1

    Affects VanquisherVenetian  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Venice
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherVenetian = 2
          and FatherTrait BiologicalSon = 1

    Affects SonVanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Venice
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherVenetian = 2
          and Trait BastardSon = 1

    Affects SonVanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Venice
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherVenetian = 2

    Affects SonVanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Venice
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherVenetian = 1

    Affects SonVanquisherVenetian  1  Chance  100

;------------------------------------------
Trigger VanquisherMilaneseBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction milan
          and BattleSuccess < crushing

    Affects VanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger VanquisherMilaneseHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction milan
          and BattleSuccess = crushing

    Affects VanquisherMilanese  4  Chance  100

;------------------------------------------
Trigger VanquisherMilaneseSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction milan
          and NumKilledGenerals > 0

    Affects VanquisherMilanese  1  Chance  75

;------------------------------------------
Trigger VanquisherMilaneseSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType milan

    Affects VanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger VanquisherMilaneseSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType milan

    Affects VanquisherMilanese  2  Chance  100

;------------------------------------------
Trigger VanquisherMilaneseExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType milan
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger VanquisherMilaneseExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType milan
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherMilanese  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Milan
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements milan = 0
          and Trait VanquisherMilanese = 1

    Affects VanquisherMilanese  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Milan
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherMilanese = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Milan
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherMilanese = 2
          and Trait BastardSon = 1

    Affects SonVanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Milan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherMilanese = 2

    Affects SonVanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Milan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherMilanese = 1

    Affects SonVanquisherMilanese  1  Chance  100

;------------------------------------------
Trigger VanquisherRomanBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction byzantium
          and BattleSuccess < crushing

    Affects VanquisherRoman  1  Chance  100

;------------------------------------------
Trigger VanquisherRomanHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction byzantium
          and BattleSuccess = crushing

    Affects VanquisherRoman  4  Chance  100

;------------------------------------------
Trigger VanquisherRomanSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction byzantium
          and NumKilledGenerals > 0

    Affects VanquisherRoman  1  Chance  75

;------------------------------------------
Trigger VanquisherRomanSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType byzantium

    Affects VanquisherRoman  1  Chance  100

;------------------------------------------
Trigger VanquisherRomanSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType byzantium

    Affects VanquisherRoman  2  Chance  100

;------------------------------------------
Trigger VanquisherRomanExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType byzantium
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherRoman  1  Chance  100

;------------------------------------------
Trigger VanquisherRomanExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType byzantium
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherRoman  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Byzantine
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements byzantium = 0
          and Trait VanquisherRoman = 1

    Affects VanquisherRoman  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Byzantine
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherRoman = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherRoman  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Byzantine
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherRoman = 2
          and Trait BastardSon = 1

    Affects SonVanquisherRoman  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Byzantine
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherRoman = 2

    Affects SonVanquisherRoman  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Byzantine
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherRoman = 1

    Affects SonVanquisherRoman  1  Chance  100

;------------------------------------------
Trigger VanquisherRussianBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction russia
          and BattleSuccess < crushing

    Affects VanquisherRussian  1  Chance  100

;------------------------------------------
Trigger VanquisherRussianHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction russia
          and BattleSuccess = crushing

    Affects VanquisherRussian  4  Chance  100

;------------------------------------------
Trigger VanquisherRussianSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction russia
          and NumKilledGenerals > 0

    Affects VanquisherRussian  1  Chance  75

;------------------------------------------
Trigger VanquisherRussianSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType russia

    Affects VanquisherRussian  1  Chance  100

;------------------------------------------
Trigger VanquisherRussianSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType russia

    Affects VanquisherRussian  2  Chance  100

;------------------------------------------
Trigger VanquisherRussianExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType russia
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherRussian  1  Chance  100

;------------------------------------------
Trigger VanquisherRussianExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType russia
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherRussian  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Russia
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements russia = 0
          and Trait VanquisherRussian = 1

    Affects VanquisherRussian  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Russia
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherRussian = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherRussian  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Russia
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherRussian = 2
          and Trait BastardSon = 1

    Affects SonVanquisherRussian  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Russia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherRussian = 2

    Affects SonVanquisherRussian  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Russia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherRussian = 1

    Affects SonVanquisherRussian  1  Chance  100

;------------------------------------------
Trigger VanquisherMoorsBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction moors
          and BattleSuccess < crushing

    Affects VanquisherMoors  1  Chance  100

;------------------------------------------
Trigger VanquisherMoorsHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction moors
          and BattleSuccess = crushing

    Affects VanquisherMoors  4  Chance  100

;------------------------------------------
Trigger VanquisherMoorsSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction moors
          and NumKilledGenerals > 0

    Affects VanquisherMoors  1  Chance  75

;------------------------------------------
Trigger VanquisherMoorsSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType moors

    Affects VanquisherMoors  1  Chance  100

;------------------------------------------
Trigger VanquisherMoorsSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType moors

    Affects VanquisherMoors  2  Chance  100

;------------------------------------------
Trigger VanquisherMoorsExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType moors
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherMoors  1  Chance  100

;------------------------------------------
Trigger VanquisherMoorsExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType moors
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherMoors  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Moors
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements moors = 0
          and Trait VanquisherMoors = 1

    Affects VanquisherMoors  10  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Moors
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherMoors = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherMoors  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Moors
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherMoors = 2
          and Trait BastardSon = 1

    Affects SonVanquisherMoors  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Moors
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherMoors = 2

    Affects SonVanquisherMoors  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Moors
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherMoors = 1

    Affects SonVanquisherMoors  1  Chance  100

;------------------------------------------
Trigger VanquisherTurksBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction turks
          and BattleSuccess < crushing

    Affects VanquisherTurks  1  Chance  100

;------------------------------------------
Trigger VanquisherTurksHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction turks
          and BattleSuccess = crushing

    Affects VanquisherTurks  4  Chance  100

;------------------------------------------
Trigger VanquisherTurksSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction turks
          and NumKilledGenerals > 0

    Affects VanquisherTurks  1  Chance  75

;------------------------------------------
Trigger VanquisherTurksSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType turks

    Affects VanquisherTurks  1  Chance  100

;------------------------------------------
Trigger VanquisherTurksSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType turks

    Affects VanquisherTurks  2  Chance  100

;------------------------------------------
Trigger VanquisherTurksExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType turks
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherTurks  1  Chance  100

;------------------------------------------
Trigger VanquisherTurksExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType turks
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherTurks  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Turks
    WhenToTest LeaderDestroyedFaction

   Condition I_NumberOfSettlements turks = 0
          and Trait VanquisherTurks = 1

    Affects VanquisherTurks  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Turks
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherTurks = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherTurks  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Turks
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherTurks = 2
          and Trait BastardSon = 1

    Affects SonVanquisherTurks  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Turks
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherTurks = 2

    Affects SonVanquisherTurks  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Turks
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherTurks = 1

    Affects SonVanquisherTurks  1  Chance  100

;------------------------------------------
Trigger VanquisherFatimidsBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction egypt
          and BattleSuccess < crushing

    Affects VanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger VanquisherFatimidsHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction egypt
          and BattleSuccess = crushing

    Affects VanquisherFatimids  4  Chance  100

;------------------------------------------
Trigger VanquisherFatimidsSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction egypt
          and NumKilledGenerals > 0

    Affects VanquisherFatimids  1  Chance  75

;------------------------------------------
Trigger VanquisherFatimidsSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType egypt

    Affects VanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger VanquisherFatimidsSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType egypt

    Affects VanquisherFatimids  2  Chance  100

;------------------------------------------
Trigger VanquisherFatimidsExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType egypt
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger VanquisherFatimidsExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType egypt
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherFatimids  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Fatimids
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements egypt = 0
          and Trait VanquisherFatimids = 1

    Affects VanquisherFatimids  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Fatimids
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherFatimids = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Fatimids
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherFatimids = 2
          and Trait BastardSon = 1

    Affects SonVanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Fatimids
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherFatimids = 2

    Affects SonVanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Fatimids
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherFatimids = 1

    Affects SonVanquisherFatimids  1  Chance  100

;------------------------------------------
Trigger VanquisherDanishBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction denmark
          and BattleSuccess < crushing

    Affects VanquisherDanish  1  Chance  100

;------------------------------------------
Trigger VanquisherDanishHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction denmark
          and BattleSuccess = crushing

    Affects VanquisherDanish  4  Chance  100

;------------------------------------------
Trigger VanquisherDanishSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction denmark
          and NumKilledGenerals > 0

    Affects VanquisherDanish  1  Chance  75

;------------------------------------------
Trigger VanquisherDanishSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType denmark

    Affects VanquisherDanish  1  Chance  100

;------------------------------------------
Trigger VanquisherDanishSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType denmark

    Affects VanquisherDanish  2  Chance  100

;------------------------------------------
Trigger VanquisherDanishExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType denmark
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherDanish  1  Chance  100

;------------------------------------------
Trigger VanquisherDanishExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType denmark
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherDanish  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Denmark
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements denmark = 0
          and Trait VanquisherDanish = 1

    Affects VanquisherDanish  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Denmark
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherDanish = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherDanish  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Denmark
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherDanish = 2
          and Trait BastardSon = 1

    Affects SonVanquisherDanish  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Denmark
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherDanish = 2

    Affects SonVanquisherDanish  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Denmark
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherDanish = 2

    Affects SonVanquisherDanish  1  Chance  100

;------------------------------------------
Trigger VanquisherPortugueseBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction portugal
          and BattleSuccess < crushing

    Affects VanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger VanquisherPortugueseHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction portugal
          and BattleSuccess = crushing

    Affects VanquisherPortuguese  4  Chance  100

;------------------------------------------
Trigger VanquisherPortugueseSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction portugal
          and NumKilledGenerals > 0

    Affects VanquisherPortuguese  1  Chance  75

;------------------------------------------
Trigger VanquisherPortugueseSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType portugal

    Affects VanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger VanquisherPortugueseSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType portugal

    Affects VanquisherPortuguese  2  Chance  100

;------------------------------------------
Trigger VanquisherPortugueseExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType portugal
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger VanquisherPortugueseExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType portugal
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherPortuguese  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Portugal
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements portugal = 0
          and Trait VanquisherPortuguese = 1

    Affects VanquisherPortuguese  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Portugal
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherPortuguese = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Portugal
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherPortuguese = 2
          and Trait BastardSon = 1

    Affects SonVanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Portugal
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherPortuguese = 2

    Affects SonVanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Portugal
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherPortuguese = 1

    Affects SonVanquisherPortuguese  1  Chance  100

;------------------------------------------
Trigger VanquisherPolishBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction poland
          and BattleSuccess < crushing

    Affects VanquisherPolish  1  Chance  100

;------------------------------------------
Trigger VanquisherPolishHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction poland
          and BattleSuccess = crushing

    Affects VanquisherPolish  4  Chance  100

;------------------------------------------
Trigger VanquisherPolishSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction poland
          and NumKilledGenerals > 0

    Affects VanquisherPolish  1  Chance  75

;------------------------------------------
Trigger VanquisherPolishSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType poland

    Affects VanquisherPolish  1  Chance  100

;------------------------------------------
Trigger VanquisherPolishSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType poland

    Affects VanquisherPolish  2  Chance  100

;------------------------------------------
Trigger VanquisherPolishExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType poland
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherPolish  1  Chance  100

;------------------------------------------
Trigger VanquisherPolishExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType poland
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherPolish  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Poland
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements poland = 0
          and Trait VanquisherPolish = 1

    Affects VanquisherPolish  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Poland
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherPolish = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherPolish  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Poland
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherPolish = 2
          and Trait BastardSon = 1

    Affects SonVanquisherPolish  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Poland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherPolish = 2

    Affects SonVanquisherPolish  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Poland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherPolish = 1

    Affects SonVanquisherPolish  1  Chance  100

;------------------------------------------
Trigger VanquisherHungarianBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction hungary
          and BattleSuccess < crushing

    Affects VanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger VanquisherHungarianHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction hungary
          and BattleSuccess = crushing

    Affects VanquisherHungarian  4  Chance  100

;------------------------------------------
Trigger VanquisherHungarianSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction hungary
          and NumKilledGenerals > 0

    Affects VanquisherHungarian  1  Chance  75

;------------------------------------------
Trigger VanquisherHungarianSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType hungary

    Affects VanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger VanquisherHungarianSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType hungary

    Affects VanquisherHungarian  2  Chance  100

;------------------------------------------
Trigger VanquisherHungarianExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType hungary
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger VanquisherHungarianExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType hungary
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherHungarian  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Hungary
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements hungary = 0
          and Trait VanquisherHungarian = 1

    Affects VanquisherHungarian  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Hungary
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherHungarian = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Hungary
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherHungarian = 2
          and Trait BastardSon = 1

    Affects SonVanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Hungary
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherHungarian = 2

    Affects SonVanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Hungary
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherHungarian = 1

    Affects SonVanquisherHungarian  1  Chance  100

;------------------------------------------
Trigger VanquisherMongolsBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction mongols
          and BattleSuccess < crushing

    Affects VanquisherMongols  1  Chance  100

;------------------------------------------
Trigger VanquisherMongolsHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction mongols
          and BattleSuccess = crushing

    Affects VanquisherMongols  4  Chance  100

;------------------------------------------
Trigger VanquisherMongolsSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction mongols
          and NumKilledGenerals > 0

    Affects VanquisherMongols  1  Chance  75

;------------------------------------------
Trigger VanquisherMongolsSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType mongols

    Affects VanquisherMongols  1  Chance  100

;------------------------------------------
Trigger VanquisherMongolsSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType mongols

    Affects VanquisherMongols  2  Chance  100

;------------------------------------------
Trigger VanquisherMongolsExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType mongols
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherMongols  1  Chance  100

;------------------------------------------
Trigger VanquisherMongolsExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType mongols
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherMongols  1  Chance  50

;------------------------------------------
Trigger achievement_son_destroyed_Mongols
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherMongols = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherMongols  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Mongols
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherMongols = 2
          and Trait BastardSon = 1

    Affects SonVanquisherMongols  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Mongols
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherMongols = 2

    Affects SonVanquisherMongols  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Mongols
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherMongols = 1

    Affects SonVanquisherMongols  1  Chance  100

;------------------------------------------
Trigger VanquisherCumansBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction cumans
          and BattleSuccess < crushing

    Affects VanquisherCumans  1  Chance  100

;------------------------------------------
Trigger VanquisherCumansHeroicBattleVictory
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction cumans
          and BattleSuccess = crushing

    Affects VanquisherCumans  4  Chance  100

;------------------------------------------
Trigger VanquisherCumansSlewGeneral
    WhenToTest PostBattle

    Condition WonBattle
          and GeneralFoughtFaction cumans
          and NumKilledGenerals > 0

    Affects VanquisherCumans  1  Chance  75

;------------------------------------------
Trigger VanquisherCumansSackedTown
    WhenToTest SackSettlement

    Condition TargetFactionType cumans

    Affects VanquisherCumans  1  Chance  100

;------------------------------------------
Trigger VanquisherCumansSlaughteredTown
    WhenToTest ExterminatePopulation

    Condition TargetFactionType cumans

    Affects VanquisherCumans  2  Chance  100

;------------------------------------------
Trigger VanquisherCumansExecutes
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType cumans
          and NumCapturedCharacters >= 1
          and RansomType execute

    Affects VanquisherCumans  1  Chance  100

;------------------------------------------
Trigger VanquisherCumansExecutesMany
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition TargetFactionType cumans
          and NumCapturedCharacters >= 2
          and RansomType execute

    Affects VanquisherCumans  1  Chance  50

;------------------------------------------
Trigger achievement_destroyed_Cumans
    WhenToTest LeaderDestroyedFaction

    Condition I_NumberOfSettlements cumans = 0
          and Trait VanquisherCumans = 1

    Affects VanquisherCumans  20  Chance  100

;------------------------------------------
Trigger achievement_son_destroyed_Cumans
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherCumans = 2
          and Trait BiologicalSon = 1

    Affects SonVanquisherCumans  1  Chance  100

;------------------------------------------
Trigger achievement_bastardson_destroyed_Cumans
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VanquisherCumans = 2
          and Trait BastardSon = 1

    Affects SonVanquisherCumans  1  Chance  100

;------------------------------------------
Trigger achievement_unborn_destroyed_Cumans
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VanquisherCumans = 2

    Affects SonVanquisherCumans  1  Chance  100

;------------------------------------------
Trigger achievement_family_destroyed_Cumans
    WhenToTest CharacterComesOfAge

    Condition FatherTrait SonVanquisherCumans = 1

    Affects SonVanquisherCumans  1  Chance  100

;*********  VENDETTA TRIGGERS  ********* 
;------------------------------------------
Trigger VendettaAgainstEngland
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction england
          and Trait VendettaSet = 0

    Affects VendettaEngland  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstEnglandForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction england
          and Trait VendettaSet = 0

    Affects VendettaEngland  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstEnglandSet
    WhenToTest PostBattle

    Condition Trait VendettaEngland = 1

    Affects VendettaSet  1  Chance  100 

;------------------------------------------
Trigger VendettaAgainstFrance
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction france
          and Trait VendettaSet = 0

    Affects VendettaFrance  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstFranceForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction france
          and Trait VendettaSet = 0

    Affects VendettaFrance  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstFranceSet
    WhenToTest PostBattle

    Condition Trait VendettaFrance = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstHRE
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction hre
          and Trait VendettaSet = 0

    Affects VendettaHRE  1  Chance  50 

;------------------------------------------
Trigger VendettaAgainstHREForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction hre
          and Trait VendettaSet = 0

    Affects VendettaHRE  1  Chance  25

;------------------------------------------
Trigger VendettaAgainstHRESet
    WhenToTest PostBattle

    Condition Trait VendettaHRE = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstSpain
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction spain
          and Trait VendettaSet = 0

    Affects VendettaSpain  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstSpainForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction spain
          and Trait VendettaSet = 0

    Affects VendettaSpain  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstSpainSet
    WhenToTest PostBattle

    Condition Trait VendettaSpain = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstSicily
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction sicily
          and Trait VendettaSet = 0

    Affects VendettaSicily  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstSicilyForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction sicily
          and Trait VendettaSet = 0

    Affects VendettaSicily  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstSicilySet
    WhenToTest PostBattle

    Condition Trait VendettaSicily = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstVenice
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction venice
          and Trait VendettaSet = 0

    Affects VendettaVenice  1  Chance  50 

;------------------------------------------
Trigger VendettaAgainstVeniceForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction venice
          and Trait VendettaSet = 0

    Affects VendettaVenice  1  Chance  25

;------------------------------------------
Trigger VendettaAgainstVeniceSet
    WhenToTest PostBattle

    Condition Trait VendettaVenice = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstMilan
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction milan
          and Trait VendettaSet = 0

    Affects VendettaMilan  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstMilanForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction milan
          and Trait VendettaSet = 0

    Affects VendettaMilan  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstMilanSet
    WhenToTest PostBattle

    Condition Trait VendettaMilan = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstScotland
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction scotland
          and Trait VendettaSet = 0

    Affects VendettaHighlanders  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstScotlandForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction scotland
          and Trait VendettaSet = 0

    Affects VendettaHighlanders  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstScotlandSet
    WhenToTest PostBattle

    Condition Trait VendettaHighlanders = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstByzantium
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction byzantium
          and Trait VendettaSet = 0

    Affects VendettaByzantine  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstByzantiumForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction byzantium
          and Trait VendettaSet = 0

    Affects VendettaByzantine  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstByzantiumSet
    WhenToTest PostBattle

    Condition Trait VendettaByzantine = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstRussia
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction russia
          and Trait VendettaSet = 0

    Affects VendettaRussia  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstRussiaForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction russia
          and Trait VendettaSet = 0

    Affects VendettaRussia  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstRussiaSet
    WhenToTest PostBattle

    Condition Trait VendettaRussia = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstMoors
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction moors
          and Trait VendettaSet = 0

    Affects VendettaMoors  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstMoorsForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction moors
          and Trait VendettaSet = 0

    Affects VendettaMoors  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstMoorsSet
    WhenToTest PostBattle

    Condition Trait VendettaMoors = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstTurks
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction turks
          and Trait VendettaSet = 0

    Affects VendettaTurks  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstTurksForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction turks
          and Trait VendettaSet = 0

    Affects VendettaTurks  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstTurksSet
    WhenToTest PostBattle

    Condition Trait VendettaTurks = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstEgypt
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction egypt
          and Trait VendettaSet = 0

    Affects VendettaFatimids  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstEgyptForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction egypt
          and Trait VendettaSet = 0

    Affects VendettaFatimids  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstEgyptSet
    WhenToTest PostBattle

    Condition Trait VendettaFatimids = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstPortugal
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction portugal
          and Trait VendettaSet = 0

    Affects VendettaPortugal  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstPortugalForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction portugal
          and Trait VendettaSet = 0

    Affects VendettaPortugal  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstPortugalSet
    WhenToTest PostBattle

    Condition Trait VendettaPortugal = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstDenmark
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction denmark
          and Trait VendettaSet = 0

    Affects VendettaDenmark  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstDenmarkForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction denmark
          and Trait VendettaSet = 0

    Affects VendettaDenmark  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstDenmarkSet
    WhenToTest PostBattle

    Condition Trait VendettaDenmark = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstPoland
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction poland
          and Trait VendettaSet = 0

    Affects VendettaPoland  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstPolandForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction poland
          and Trait VendettaSet = 0

    Affects VendettaPoland  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstPolandSet
    WhenToTest PostBattle

    Condition Trait VendettaPoland = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstHungary
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction hungary
          and Trait VendettaSet = 0

    Affects VendettaHungary  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstHungaryForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction hungary
          and Trait VendettaSet = 0

    Affects VendettaHungary  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstHungarySet
    WhenToTest PostBattle

    Condition Trait VendettaHungary = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger VendettaAgainstMongols
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > average
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction mongols
          and Trait VendettaSet = 0

    Affects VendettaMongols  1  Chance  50

;------------------------------------------
Trigger VendettaAgainstMongolsForHumiliation
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess > clear
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and GeneralFoughtFaction mongols
          and Trait VendettaSet = 0

    Affects VendettaMongols  1  Chance  25 

;------------------------------------------
Trigger VendettaAgainstMongolsSet
    WhenToTest PostBattle

    Condition Trait VendettaMongols = 1

    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_England
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaEngland = 1
          and Trait VendettaSet = 0

    Affects VendettaEngland  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_France
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaFrance = 1
          and Trait VendettaSet = 0

    Affects VendettaFrance  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_HRE
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaHRE = 1
          and Trait VendettaSet = 0

    Affects VendettaHRE  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Spain
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaSpain = 1
          and Trait VendettaSet = 0

    Affects VendettaSpain  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Sicily
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaSicily = 1
          and Trait VendettaSet = 0

    Affects VendettaSicily  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Scotland
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaHighlanders = 1
          and Trait VendettaSet = 0

    Affects VendettaHighlanders  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Venice
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaVenice = 1
          and Trait VendettaSet = 0

    Affects VendettaVenice  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Milan
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaMilan = 1
          and Trait VendettaSet = 0

    Affects VendettaHRE  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Byzantine
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaByzantine = 1
          and Trait VendettaSet = 0

    Affects VendettaByzantine  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Russia
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaRussia = 1
          and Trait VendettaSet = 0

    Affects VendettaRussia  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Moors
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaMoors = 1
          and Trait VendettaSet = 0

    Affects VendettaMoors  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Turks
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaTurks = 1
          and Trait VendettaSet = 0

    Affects VendettaTurks  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Fatimids
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaFatimids = 1
          and Trait VendettaSet = 0

    Affects VendettaFatimids  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Denmark
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaDenmark = 1
          and Trait VendettaSet = 0

    Affects VendettaDenmark  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Portugal
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaPortugal > 0
          and Trait VendettaSet = 0

    Affects VendettaPortugal  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Poland
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaPoland = 1
          and Trait VendettaSet = 0

    Affects VendettaPoland  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Hungary
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaHungary = 1
          and Trait VendettaSet = 0

    Affects VendettaHungary  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger Dad_was_Slain_by_Mongols
    WhenToTest CharacterTurnEnd

    Condition FatherTrait VendettaMongols = 1
          and Trait VendettaSet = 0

    Affects VendettaMongols  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_England
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaEngland = 1
          and not I_NumberOfSettlements england = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaEngland  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_France
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaFrance = 1
          and not I_NumberOfSettlements france = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaFrance  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_HRE
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaHRE = 1
          and not I_NumberOfSettlements hre = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaHRE  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Spain
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaSpain = 1
          and not I_NumberOfSettlements spain = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaSpain  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Sicily
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaSicily = 1
          and not I_NumberOfSettlements sicily = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaSicily  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Scotland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaHighlanders = 1
          and not I_NumberOfSettlements scotland = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaHighlanders  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Venice
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaVenice = 1
          and not I_NumberOfSettlements venice = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaVenice  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Milan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaMilan = 1
          and not I_NumberOfSettlements milan = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaMilan  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Byzantine
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaByzantine = 1
          and not I_NumberOfSettlements byzantium = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaByzantine  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Russia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaRussia = 1
          and not I_NumberOfSettlements russia = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaRussia  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Moors
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaMoors = 1
          and not I_NumberOfSettlements moors = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaMoors  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Turks
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaTurks = 1
          and not I_NumberOfSettlements turks = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaTurks  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Fatimids
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaFatimids = 1
          and not I_NumberOfSettlements egypt = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaFatimids  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Denmark
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaDenmark = 1
          and not I_NumberOfSettlements denmark = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaDenmark  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Portugal
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaPortugal = 1
          and not I_NumberOfSettlements portugal = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaPortugal  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Poland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaPoland = 1
          and not I_NumberOfSettlements poland = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaPoland  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Hungary
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaHungary = 1
          and not I_NumberOfSettlements hungary = 0
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaHungary  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger DadorGranddad_was_Slain_by_Mongols
    WhenToTest CharacterComesOfAge

    Condition FatherTrait VendettaMongols = 1
    and RandomPercent > 49
    and RandomPercent < 81

    Affects VendettaMongols  1  Chance  100
    Affects VendettaSet  1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstEngland
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaEngland = 1
          and I_NumberOfSettlements england = 0

    Affects VendettaEngland  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstFrance
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaFrance = 1
          and I_NumberOfSettlements france = 0

    Affects VendettaFrance  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstHRE
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaHRE = 1
          and I_NumberOfSettlements hre = 0

    Affects VendettaHRE  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstSpain
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaSpain = 1
          and I_NumberOfSettlements spain = 0

    Affects VendettaSpain  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstSicily
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaSicily = 1
          and I_NumberOfSettlements sicily = 0

    Affects VendettaSicily  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstScotland
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaHighlanders = 1
          and I_NumberOfSettlements scotland = 0

    Affects VendettaHighlanders  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstVenice
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaVenice = 1
          and I_NumberOfSettlements venice = 0

    Affects VendettaVenice  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstMilan
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaMilan = 1
          and I_NumberOfSettlements milan = 0

    Affects VendettaMilan  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstByzantine
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaByzantine = 1
          and I_NumberOfSettlements byzantium = 0

    Affects VendettaByzantine  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstRussia
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaRussia = 1
          and I_NumberOfSettlements russia = 0

    Affects VendettaRussia  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstMoors
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaMoors = 1
          and I_NumberOfSettlements moors = 0

    Affects VendettaMoors  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstTurks
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaTurks = 1
          and I_NumberOfSettlements turks = 0

    Affects VendettaTurks  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstFatimids
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaFatimids = 1
          and I_NumberOfSettlements egypt = 0

    Affects VendettaFatimids  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstDenmark
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaDenmark = 1
          and I_NumberOfSettlements denmark = 0

    Affects VendettaDenmark  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstPortugal
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaPortugal = 1
          and I_NumberOfSettlements portugal = 0

    Affects VendettaPortugal  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstPoland
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaPoland = 1
          and I_NumberOfSettlements poland = 0

    Affects VendettaPoland  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;------------------------------------------
Trigger ForgetVendettaagainstHungary
    WhenToTest CharacterTurnEnd

    Condition Trait VendettaHungary = 1
          and I_NumberOfSettlements hungary = 0

    Affects VendettaHungary  -1  Chance  100
    Affects VendettaSet  -1  Chance  100

;*********  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *********
;*********  START OF TWEAKED VANILLA TRIGGERS *********
;*********  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *********


;*********  MILITARISTIC/POSTBATTLE TRAIT TRIGGERS  *********
;------------------------------------------
Trigger prisoners_captor1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType release
          and NumCapturedSoldiers > 50

    Affects CaptorChivalry  1  Chance  100 

;------------------------------------------
Trigger prisoners_captor2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType execute
          and NumCapturedSoldiers > 50

    Affects CaptorDread  1  Chance  85 

;------------------------------------------
Trigger prisoners_payer1
    WhenToTest GeneralPrisonersRansomedCaptive

    Condition RansomType ransom
          and NumCapturedSoldiers > 50
          and RansomAmount > 1000

    Affects RansomChivalry  1  Chance  100 

;------------------------------------------
Trigger prisoners_payer2
    WhenToTest GeneralPrisonersRansomedCaptive

    Condition RansomType execute
          and NumCapturedSoldiers > 50
          and RansomAmount < 8000

    Affects RansomDread  1  Chance  85 

;------------------------------------------
Trigger triumphsoverfaction
    WhenToTest LeaderDestroyedFaction

    Affects FactionKiller  10  Chance  100

;------------------------------------------
;VictorVirtue thresholds 10, 20, 30
;if this is to fast edit thresholds
Trigger triumphs_in_battle_standard
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess < clear

    Affects VictorVirtue  1  Chance  100

;------------------------------------------
Trigger triumphs_in_battle_clear
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess = clear

    Affects VictorVirtue  2  Chance  100

;------------------------------------------
Trigger triumphs_in_battle_crushing
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess > clear

    Affects VictorVirtue  3  Chance  100

;------------------------------------------
Trigger triumphs_in_siege
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and I_ConflictType Siege
          and GeneralNumKillsInBattle > 6
          and BattleOdds <= 0.9

    Affects VictorVirtue  1  Chance  100
    Affects VictorVirtue  1  Chance  40

;------------------------------------------
Trigger triumphs_in_capture
    WhenToTest GeneralCaptureSettlement

    Affects VictorVirtue  2  Chance  100

;------------------------------------------
Trigger triumphs_in_capture_of_Rome
    WhenToTest GeneralCaptureSettlement

    Condition SettlementName Rome

   Affects VictorVirtue  8  Chance  100

;------------------------------------------
Trigger triumphs_in_capture_of_Constantinople
    WhenToTest GeneralCaptureSettlement

    Condition SettlementName Constantinople
          and not CultureType greek

    Affects VictorVirtue  8  Chance  100

;------------------------------------------
Trigger triumphs_in_capture_of_Jerusalem
    WhenToTest GeneralCaptureSettlement

    Condition SettlementName Jerusalem

    Affects VictorVirtue  8  Chance  100

;------------------------------------------
Trigger devastation
    WhenToTest GeneralDevastatesTile

    Affects Despoiler  1  Chance  4

;------------------------------------------
Trigger extermination_own_1
    WhenToTest SackSettlement

    Condition PopulationOwnReligion > 50

    Affects Despoiler  1  Chance  40 
    Affects BadDisciplinarian  1  Chance  15
    Affects StrategyDread  1  Chance  85 

;------------------------------------------
Trigger extermination_own_2
    WhenToTest ExterminatePopulation

    Condition PopulationOwnReligion > 50

    Affects Genocide  1  Chance  85 
    Affects Bloodthirsty  1  Chance  10 
    Affects StrategyDread  1  Chance  85 
    Affects BadDisciplinarian  1  Chance  30

;------------------------------------------
Trigger extermination_foriegn_1
    WhenToTest SackSettlement

    Condition PopulationOwnReligion < 30

    Affects Despoiler  1  Chance  40 
    Affects StrategyDread  1  Chance  15

;------------------------------------------
Trigger extermination_foriegn_2
    WhenToTest ExterminatePopulation

    Condition PopulationOwnReligion < 30

    Affects Despoiler  1  Chance  85 
    Affects Bloodthirsty  1  Chance  10 
    Affects StrategyDread  1  Chance  85 

;------------------------------------------
Trigger sack_jerusalem
    WhenToTest SackSettlement

    Condition IsRegionOneOf 183 Jerusalem_Province

    Affects Despoiler  1  Chance  40 
    Affects StrategyDread  1  Chance  50

;------------------------------------------
Trigger extermination_jerusalem
    WhenToTest ExterminatePopulation

    Condition IsRegionOneOf 183 Jerusalem_Province

    Affects Despoiler  1  Chance  85 
    Affects Bloodthirsty  1  Chance  20 
    Affects StrategyDread  1  Chance  85 

;------------------------------------------
;only the human player as AI won't be able to handle this.
Trigger UndisciplinedArmy_a
    WhenToTest PostBattle

    Condition IsGeneral
    and not WonBattle
    and PercentageRoutedOffField >= 40
    and FactionIsLocal

    Affects BadDisciplinarian 1 Chance 25

;------------------------------------------
Trigger UndisciplinedArmy_b
    WhenToTest PostBattle

    Condition WonBattle
    and IsGeneral
    and BattleOdds < 0.6
    and PercentageRoutedOffField < 25

    Affects Disciplinarian 1 Chance 20

;------------------------------------------
Trigger Battle_General_Took_Hits
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.3

    Affects BattleScarred  1  Chance  17 
    Affects Brave  1  Chance  15  

;------------------------------------------
Trigger Battle_Berserker_Actions_denmark
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.3
        and FactionType denmark 
	and Trait Berserker >= 1

    Affects Berserker  1  Chance  25 

;------------------------------------------
Trigger Battle_Berserker_Actions_norway
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.3
        and FactionType norway 
	and Trait Berserker >= 1

    Affects Berserker  1  Chance  25 

;------------------------------------------
Trigger Battle_Berserker_Actions_lithuania
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.3
        and FactionType lithuania 
	and Trait Berserker >= 1

    Affects Berserker  1  Chance  25 

;------------------------------------------
Trigger battle1
    WhenToTest PostBattle

    Condition GeneralHPLostRatioinBattle > 0.3

    Affects BattleScarred  1  Chance  17 
    Affects Brave  1  Chance  15 

;------------------------------------------
Trigger battle2
    WhenToTest PostBattle

    Condition GeneralNumKillsInBattle > 6
          and GeneralHPLostRatioinBattle > 0.5

    Affects Brave  1  Chance  30  

;------------------------------------------
Trigger battle2a
    WhenToTest PostBattle

    Condition GeneralNumKillsInBattle > 6

    Affects Brave  1  Chance  15  

;------------------------------------------
Trigger battle3
    WhenToTest PostBattle

    Condition GeneralNumKillsInBattle > 8
          and not Trait BattleChivalry >= 1
          and not Trait BattleDread >= 1

    Affects Brave  1  Chance  20 
    Affects Bloodthirsty  1  Chance  10 

;------------------------------------------
Trigger battle_Dread_fighting
    WhenToTest PostBattle

    Condition GeneralNumKillsInBattle > 8
          and not Trait BattleChivalry > 0

    Affects BattleDread  1  Chance  5 
    Affects Brave  1  Chance  20 
    Affects Bloodthirsty  1  Chance  10 

;------------------------------------------
Trigger battle_Chivalry_fighting
    WhenToTest PostBattle

    Condition GeneralNumKillsInBattle > 8
          and not Trait BattleDread > 0

    Affects BattleChivalry  1  Chance  15 
    Affects Brave  1  Chance  20 

;------------------------------------------
Trigger battle_BattleChivalry_Defender
    WhenToTest PostBattle

    Condition not WasAttacker
          and IsGeneral
          and BattleOdds <= 0.5
          and not Trait BattleDread >= 1
          and GeneralFoughtInCombat

    Affects BattleChivalry  1  Chance  85 

;------------------------------------------
Trigger battle_BattleChivalry_Attacker
    WhenToTest PostBattle

    Condition WasAttacker
          and IsGeneral
          and WonBattle
          and BattleOdds <= 0.5
          and not Trait BattleDread >= 1
          and GeneralFoughtInCombat

    Affects BattleChivalry  1  Chance  33 

;------------------------------------------
Trigger battle3Chivalry1_notchaserouters
    WhenToTest PostBattle

    Condition WonBattle
          and BattleSuccess >= average
          and PercentageEnemyKilled < 10
          and not GeneralFoughtInCombat
          and IsGeneral
          and BattleOdds < 0.95
          and not Trait BattleDread > 0

    Affects BattleChivalry  1  Chance  33 

;------------------------------------------
Trigger battle3Chivalry_Dread_Not_fighting
    WhenToTest PostBattle

    Condition not WonBattle
          and not GeneralFoughtInCombat
          and PercentageEnemyKilled < 10

    Affects BattleChivalry -1  Chance  55 
    Affects BattleDread -1  Chance  40 

;------------------------------------------
Trigger battle3Chivalry_Dread_Routing
    WhenToTest PostBattle

    Condition Routs
          and PercentageEnemyKilled < 33
          and GeneralNumKillsInBattle < 8

    Affects BattleChivalry -2  Chance  85 
    Affects BattleDread -2  Chance  85 

;------------------------------------------
Trigger battle3Chivalry_Dread_Routing2
    WhenToTest PostBattle

    Condition Routs
          and PercentageEnemyKilled >= 33
          and PercentageEnemyKilled <= 66
          and GeneralNumKillsInBattle < 8
          and BattleOdds > 0.75

    Affects BattleChivalry -1  Chance  85 
    Affects BattleDread -1  Chance  85 

;------------------------------------------
Trigger battle3Dread_PickingOnWeak
    WhenToTest PostBattle

    Condition WasAttacker
          and WonBattle
          and BattleOdds > 2
          and PercentageEnemyKilled > 75
          and not Trait BattleChivalry > 0

    Affects BattleDread  1  Chance  15 

;------------------------------------------
Trigger battle3Dread_TotalAnnihilation
    WhenToTest PostBattle

    Condition WonBattle
          and BattleSuccess >= crushing
          and PercentageEnemyKilled > 90
          and not GeneralFoughtInCombat
          and IsGeneral
          and BattleOdds < 0.95
          and not Trait BattleChivalry > 0

    Affects BattleDread  2  Chance  33 

;------------------------------------------
Trigger battle3Dread_Let_Them_Go
    WhenToTest PostBattle

    Condition WonBattle
          and BattleSuccess >= average
          and PercentageEnemyKilled < 40
          and not GeneralFoughtInCombat
          and IsGeneral
          and BattleOdds < 0.95
          and not Trait BattleChivalry > 0

    Affects BattleDread -1  Chance  33 

;------------------------------------------
Trigger battle_coward1
    WhenToTest PostBattle

    Condition not WonBattle
          and not GeneralFoughtInCombat
          and PercentageEnemyKilled < 20

    Affects Coward  1  Chance  70 

;------------------------------------------
Trigger battle_coward2
    WhenToTest PostBattle

    Condition not GeneralFoughtInCombat
          and PercentageEnemyKilled = 0

    Affects Coward  1  Chance  10 

;------------------------------------------
Trigger battle_coward3
    WhenToTest BattleGeneralRouted

    Affects Coward  1  Chance  25

;------------------------------------------
Trigger battle5
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and not Trait Ignorance > 0

    Affects InspiringSpeaker  1  Chance  10 

;------------------------------------------
Trigger battle7
    WhenToTest BattleGeneralRouted

    Affects Coward  1  Chance  33 

;------------------------------------------
Trigger night_battle_crushing_victory_attacker
    WhenToTest PostBattle

    Condition WasAttacker
          and IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and BattleOdds >= 0.5
          and BattleOdds < 2
          and IsNightBattle

    Affects Noctophilia  1  Chance  33 

;------------------------------------------
Trigger night_battle_crushing_victory_defender
    WhenToTest PostBattle

    Condition not WasAttacker
          and IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and BattleOdds >= 0.5
          and BattleOdds < 2
          and IsNightBattle

    Affects Noctophilia  1  Chance  33 

;------------------------------------------
Trigger night_battle_crushing_loss_attacker
    WhenToTest PostBattle

    Condition WasAttacker
          and IsGeneral
          and not WonBattle
          and BattleSuccess >= clear
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and IsNightBattle

    Affects Noctophobia  1  Chance  25 

;------------------------------------------
Trigger night_battle_crushing_loss_defender
    WhenToTest PostBattle

    Condition not WasAttacker
          and IsGeneral
          and not WonBattle
          and BattleSuccess >= clear
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and IsNightBattle

    Affects Noctophobia  1  Chance  25 

;------------------------------------------
Trigger diet_of_carrots_1
    WhenToTest CharacterTurnStart

    Condition Trait NightBattleCapable = 0
          and IsGeneral
          and Attribute Command >= 5

    Affects NightBattleCapable  1  Chance  25 

;------------------------------------------
Trigger diet_of_carrots_2
    WhenToTest PostBattle

    Condition IsGeneral
          and Attribute Command >= 1
          and IsNightBattle
          and Trait NightBattleCapable = 0
          and WonBattle

    Affects NightBattleCapable  1  Chance  17 

;------------------------------------------
Trigger hate_n_fear_1
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction denmark

    Affects Hatescuman  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_2
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction byzantium

    Affects Hatesbyzantium  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_3
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction denmark

    Affects Hatesdenmark  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_4
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction egypt

    Affects Hatesegypt  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_5
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction england

    Affects Hatesengland  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_6
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction france

    Affects Hatesfrance  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_7
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction hre

    Affects Hateshre  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_8
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction hungary

    Affects Hateshungary  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_9
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction milan

    Affects Hatesmilan  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_10
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction moors

    Affects Hatesmoors  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_11
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction papal_states

    Affects Hatespapal_states  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_12
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction poland

    Affects Hatespoland  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_13
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction portugal

    Affects Hatesportugal  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_14
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction slave

    Affects Hatesslave  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_15
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction sicily

    Affects Hatessicily  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_16
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction spain

    Affects Hatesspain  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_18
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction turks

    Affects Hatesturks  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_19
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.5
          and BattleOdds < 1.5
          and GeneralFoughtFaction venice

    Affects Hatesvenice  1  Chance  40 

;------------------------------------------
Trigger hate_n_fear_25
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction cumans

    Affects Fearscuman  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_26
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction byzantium

    Affects Fearsbyzantium  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_27
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction denmark

    Affects Fearsdenmark  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_28
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction egypt

    Affects Fearsegypt  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_29
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction england

    Affects Fearsengland  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_30
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction france

    Affects Fearsfrance  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_31
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction hre

    Affects Fearshre  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_32
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction hungary

    Affects Fearshungary  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_33
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction milan

    Affects Fearsmilan  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_34
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction mongols

    Affects Fearsmongols  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_35
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction moors

    Affects Fearsmoors  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_36
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction papal_states

    Affects Fearspapal_states  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_37
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction poland

    Affects Fearspoland  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_38
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction portugal

    Affects Fearsportugal  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_39
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction slave

    Affects Fearsslave  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_40
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction russia

    Affects Fearsrussia  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_41
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction sicily

    Affects Fearssicily  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_42
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction spain

    Affects Fearsspain  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_43
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction turks

    Affects Fearsturks  1  Chance  50

;------------------------------------------
Trigger hate_n_fear_45
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
;          and BattleSuccess = crushing
          and I_ConflictType Normal
          and BattleOdds >= 0.9
          and GeneralFoughtFaction venice

    Affects Fearsvenice  1  Chance  50

;*********  OFFERED FOR ADOPTION  *********
;------------------------------------------
Trigger Worthy_Of_Adoption_Military_Trigger1
    WhenToTest OfferedForAdoption

    Condition Trait MilitaryInclination = 1

    Affects NaturalMilitarySkill  1  Chance  8 
    Affects GoodCommander  1  Chance  50
    Affects GoodCommander  1  Chance  25
    Affects Brave  3  Chance  17 
    Affects Disciplinarian  2  Chance  17 

;------------------------------------------
Trigger Worthy_Of_Adoption_Military_Trigger2
    WhenToTest OfferedForAdoption

    Condition Trait MilitaryInclination = 1

    Affects NightBattleCapable  1  Chance  10 
    Affects BattleScarred  1  Chance  17 
    Affects Loyal  1  Chance  33 
    Affects Intelligent  1  Chance  5
    Affects BattleChivalry  1  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Adoption_Military_Trigger3
    WhenToTest OfferedForAdoption

    Condition Trait MilitaryInclination = 1

    Affects Drink  1  Chance  10 
    Affects Girls  1  Chance  17 
    Affects Feck  1  Chance  8 
    Affects Trusting  1  Chance  8 
    Affects DeceiverVirtue  1  Chance  8 

;------------------------------------------
Trigger Worthy_Of_Adoption_Governor_Trigger
    WhenToTest OfferedForAdoption

    Condition Trait GovernorInclination = 1

    Affects GoodAdministrator  6  Chance  20 
    Affects GoodTrader  12  Chance  20 
    Affects GoodBuilder  6  Chance  20 
    Affects Intelligent  1  Chance  10 
    Affects Loyal  1  Chance  25 
    Affects DeceiverVirtue  1  Chance  8 
    Affects Corrupt  1  Chance  10 

;------------------------------------------
Trigger Worthy_Of_Adoption_General_catholic
    WhenToTest OfferedForAdoption

    Condition FactionReligion catholic
    and Trait GovernorInclination = 1

    Affects Drink  1  Chance  10 
    Affects Girls  1  Chance  10 
    Affects Sobriety  1  Chance  10 
    Affects Upright 1  Chance  20 
    Affects ReligiousActivity  1  Chance  10 

;------------------------------------------
Trigger Worthy_Of_Adoption_General_orthodox
    WhenToTest OfferedForAdoption

    Condition FactionReligion orthodox
    and Trait GovernorInclination = 1

    Affects Drink  1  Chance  5 
    Affects Sobriety  1  Chance  10 
    Affects Upright 1  Chance  33 
    Affects ReligiousActivity  1  Chance  15 

;------------------------------------------
Trigger Worthy_Of_Adoption_General_islam
    WhenToTest OfferedForAdoption

    Condition FactionReligion islam
    and Trait GovernorInclination = 1

    Affects Drink  1  Chance  5 
    Affects Sobriety  1  Chance  15 
    Affects Upright 1  Chance  33 
    Affects Prim 1  Chance  33 
    Affects ReligiousActivity  1  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_General_Loyalty
    WhenToTest OfferedForAdoption

    Affects LoyaltyStarter  1  Chance  100 
    Affects ReligionStarter  1  Chance  100 
    Affects Loyal  1  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_loyalty_2
    WhenToTest OfferedForAdoption

    Condition Trait Loyal >= 1

    Affects Loyal  1  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_loyalty_3
    WhenToTest OfferedForAdoption

    Condition Trait Loyal >= 2

    Affects Loyal  2  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_loyalty_4
    WhenToTest OfferedForAdoption

    Condition Trait Loyal >= 3

    Affects Loyal  2  Chance  25 

;------------------------------------------
Trigger Worth_of_Adoption_piety_1
    WhenToTest OfferedForAdoption

    Affects ReligiousActivity  1  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_piety_2
    WhenToTest OfferedForAdoption

    Condition Trait ReligiousActivity >= 1

    Affects ReligiousActivity  3  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_piety_3
    WhenToTest OfferedForAdoption

    Condition Trait ReligiousActivity >= 2

    Affects ReligiousActivity  4  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_piety_4
    WhenToTest OfferedForAdoption

    Condition Trait ReligiousActivity < 1

    Affects ReligiousInactivity  1  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_piety_5
    WhenToTest OfferedForAdoption

    Condition Trait ReligiousInactivity >= 1

    Affects ReligiousInactivity  1  Chance  10 

;------------------------------------------
Trigger Worth_of_Adoption_chiv_1
    WhenToTest OfferedForAdoption

    Condition Trait BattleChivalry >= 1

    Affects BattleChivalry  2  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_chiv_2
    WhenToTest OfferedForAdoption

    Condition Trait BattleChivalry < 1

    Affects BattleDread  1  Chance  33 

;------------------------------------------
Trigger Worth_of_Adoption_chiv_3
    WhenToTest OfferedForAdoption

    Condition Trait BattleDread >= 1

    Affects BattleDread  2  Chance  33 


;*********  OFFERED FOR MARRIAGE  *********
;cultural traits for marriage + inclination
;------------------------------------------
Trigger Worthy_Of_Marriage_General_Military
    WhenToTest OfferedForMarriage

    Condition Trait MilitaryInclination = 1

    Affects NaturalMilitarySkill  1  Chance  8 
    Affects GoodCommander  3  Chance  33 
    Affects Brave  1  Chance  17 
    Affects NightBattleCapable  1  Chance  10 
    Affects BattleScarred  1  Chance  17 
    Affects BattleChivalry  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_General_Governor
    WhenToTest OfferedForMarriage

    Condition Trait GovernorInclination = 1

    Affects GoodCommander  1  Chance  33 
    Affects GoodAdministrator  6  Chance  17 
    Affects Loyal  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_General1
    WhenToTest OfferedForMarriage

    Affects Drink  1  Chance  4 
    Affects Sobriety  1  Chance  12 
    Affects Disciplinarian  2  Chance  17 
    Affects Loyal  1  Chance  17 
    Affects Intelligent  1  Chance  8 
    Affects Upright  1  Chance  8 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_1
    WhenToTest OfferedForMarriage

    Affects LoyaltyStarter  1  Chance  100 
    Affects ReligionStarter  1  Chance  100 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_2
    WhenToTest OfferedForMarriage

    Condition Trait Loyal >= 1

    Affects Loyal  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_3
    WhenToTest OfferedForMarriage

    Condition Trait Loyal >= 2

    Affects Loyal  2  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_4
    WhenToTest OfferedForMarriage

    Condition Trait Loyal >= 3

    Affects Loyal  2  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_5
    WhenToTest OfferedForMarriage

    Condition Trait Loyal < 1

    Affects Disloyal  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_6
    WhenToTest OfferedForMarriage

    Condition Trait Disloyal >= 1

    Affects Disloyal  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_7
    WhenToTest OfferedForMarriage

    Condition Trait Disloyal >= 2

    Affects Disloyal  2  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_loyalty_8
    WhenToTest OfferedForMarriage

    Condition Trait Disloyal >= 3

    Affects Disloyal  2  Chance  25 

;------------------------------------------
Trigger Worthy_Of_Marriage_piety_1
    WhenToTest OfferedForMarriage


    Affects ReligiousActivity  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_piety_2
    WhenToTest OfferedForMarriage

    Condition Trait ReligiousActivity >= 1

    Affects ReligiousActivity  3  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_piety_3
    WhenToTest OfferedForMarriage

    Condition Trait ReligiousActivity >= 2

    Affects ReligiousActivity  4  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_piety_4
    WhenToTest OfferedForMarriage

    Condition Trait ReligiousActivity < 1

    Affects ReligiousInactivity  1  Chance  33 

;------------------------------------------
Trigger Worthy_Of_Marriage_piety_5
    WhenToTest OfferedForMarriage

    Condition Trait ReligiousInactivity >= 1

    Affects ReligiousInactivity  1  Chance  10 

;*********  MAN OF THE HOUR ADOPTION TRIGGERS  *********  
;------------------------------------------
Trigger Lesser_General_Adoption_1_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Affects NaturalMilitarySkill  1  Chance  8 
    Affects GoodCommander  1  Chance  85 
    Affects Brave  3  Chance  17 
    Affects Loyal  3  Chance  17 

;------------------------------------------
Trigger Lesser_General_Adoption_2_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Affects Drink  1  Chance  5
    Affects Sobriety  1  Chance  12 
    Affects Disciplinarian  2  Chance  17 
    Affects GoodAdministrator  6  Chance  17 
    Affects NightBattleCapable  1  Chance  10 

;------------------------------------------
Trigger Lesser_General_Adoption_3_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Affects BattleScarred  1  Chance  17 
    Affects Intelligent  1  Chance  8 
    Affects GoodCommander  1  Chance  40 
    Affects GoodCommander  1  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_4_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Affects LoyaltyStarter  1  Chance  100 
    Affects Loyal  1  Chance  33 
    Affects ReligionStarter  1  Chance  100 
    Affects BattleChivalry  1  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_5_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait Loyal >= 1

    Affects Loyal  1  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_6_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait Loyal >= 2

    Affects Loyal  2  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_7_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait Loyal >= 3

    Affects Loyal  2  Chance  25 

;------------------------------------------
Trigger Lesser_General_Adoption_12_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption


    Affects ReligiousActivity  1  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_13_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait ReligiousActivity >= 1

    Affects ReligiousActivity  3  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_14_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait ReligiousActivity >= 2

    Affects ReligiousActivity  4  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_15_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait ReligiousActivity < 1

    Affects ReligiousInactivity  1  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_16_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait ReligiousInactivity >= 1

    Affects ReligiousInactivity  1  Chance  10 

;------------------------------------------
Trigger Lesser_General_Adoption_17_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait BattleChivalry >= 1

    Affects BattleChivalry  2  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_18_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait BattleChivalry < 1

    Affects BattleDread  1  Chance  33 

;------------------------------------------
Trigger Lesser_General_Adoption_19_VnV_Trigger
    WhenToTest LesserGeneralOfferedForAdoption

    Condition Trait BattleDread >= 1

    Affects BattleDread  2  Chance  33 

;============= PERSONALITY TRIGGERS ====================
;--------- Governing - Military Traits --------------
;------------------------------------------
Trigger sitting_around_town_with_jousting
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= jousting_lists

    Affects TourneyKnight  1  Chance  10 

;------------------------------------------
Trigger governor_building_castle_command
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= castle 

    Affects GoodCommander  1  Chance  20

;------------------------------------------
Trigger governor_building_smith
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= armourer 

    Affects GoodCommander  1  Chance  5

;------------------------------------------
Trigger governor_building_castlesmith
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_armourer 

    Affects GoodCommander  1  Chance  10

;------------------------------------------
Trigger governor_building_stables
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= barons_stables 
    and Trait MilitaryInclination = 1

    Affects GoodCavalryGeneral  3  Chance  20

;------------------------------------------
Trigger governor_building_barracks
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= drill_square 
    and Trait MilitaryInclination = 1

    Affects GoodInfantryGeneral  3  Chance  20

;------------------------------------------
Trigger sitting_around_town_with_racing
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= racing_track

    Affects HorseRacer  1  Chance  10 
    Affects GoodCavalryGeneral  3  Chance  10

;------------------------------------------
Trigger governor_building_castlesiege
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished = c_siege_works  
    and Trait MilitaryInclination = 1

    Affects Military_Edu  1  Chance  20
    Affects GoodEngineer  1  Chance  20

;------------------------------------------
Trigger governor_building_siege
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished = siege_works  

    Affects Military_Edu  1  Chance  10
    Affects GoodEngineer  1  Chance  10

;------------------------------------------
Trigger governor_building_castlecannon
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_cannon_foundry  
    and Trait MilitaryInclination = 1

    Affects Military_Edu  1  Chance  20
    Affects GoodGunpowderCommander  1  Chance  20

;------------------------------------------
Trigger governor_building_cannon
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= cannon_foundry  

    Affects Military_Edu  1  Chance  10
    Affects GoodGunpowderCommander  1  Chance  10

;------------------------------------------
Trigger governor_building_academy
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= military_academy 

    Affects Military_Edu  1  Chance  100

;------------------------------------------
Trigger sitting_around_town_with_militaryacademy
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= military_academy

    Affects Military_Edu  1  Chance  15 

;------------------------------------------
Trigger sitting_around_town_with_naval_academy
    WhenToTest CharacterTurnEnd

    Condition IsAdmiral
          and EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= naval_academy

    Affects Sailor  1  Chance  10 

;------------------------------------------
Trigger sitting_around_at_sea
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea

    Affects Drink  1  Chance  4
    Affects Military_Edu  1  Chance  5  

;-------- Governing -  Outside Settlement ---------
;------------------------------------------
Trigger sitting_around_camp_vnv_trigger
    WhenToTest CharacterTurnEnd

    Condition not EndedInSettlement
          and RemainingMPPercentage = 100
          and RandomPercent > 60

    Affects Feck  1  Chance  1 
    Affects HaleAndHearty  1  Chance  1 
    Affects Scout  1  Chance  1 

;------------------------------------------
Trigger harsh_lifestyle2
    WhenToTest CharacterTurnEnd
;with supplies not worth spending time in wild.

    Condition not EndedInSettlement
          and RemainingMPPercentage = 100
          and InEnemyLands

    Affects HaleAndHearty  1  Chance  5 
    Affects Austere  1  Chance  2 
    Affects Cuckold  1  Chance  2 
    Affects Ignorance  1  Chance  1 
    Affects Pragmatic  1  Chance  2 
    Affects Stoic  1  Chance  2 

;------------------------------------------
Trigger harsh_lifestyle3
    WhenToTest CharacterTurnEnd
;with supplies, not worth spending time in wild.

    Condition not EndedInSettlement
          and RemainingMPPercentage = 100
          and not InEnemyLands

    Affects HaleAndHearty  1  Chance  10 
    Affects Austere  1  Chance  2 
    Affects Pragmatic  1  Chance  2 
    Affects Stoic  1  Chance  2 


;--------- Governing - Builder Traits --------------
;GoodBuilder, thesholds 6, 12 24; average build time 5/6 turns
;------------------------------------------
Trigger governor_building
    WhenToTest GovernorBuildingCompleted

;    Condition GovernorInResidence

    Affects GoodBuilder  1  Chance  20

;------------------------------------------
Trigger governor_building_walls
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= stone_wall 

    Affects GoodBuilder  6  Chance  20
    Affects GoodAdministrator  1  Chance  20

;------------------------------------------
Trigger governor_building_NoSqualor
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= public_baths 

    Affects GoodBuilder  3  Chance  20
    Affects GoodAdministrator  1  Chance  20

;------------------------------------------
Trigger governor_building_castle_builder
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= castle 

    Affects GoodBuilder  6  Chance  20

;------------------------------------------
Trigger building_roads
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= roads

    Affects GoodBuilder  3  Chance  20 

;------------------------------------------
Trigger building_castleroads
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_roads

    Affects GoodBuilder  3  Chance  20 

;-------- Governing - Trader Traits -----------
;GoodTrader, thesholds 12, 24, 48; average build time 5/6 turns
;------------------------------------------
Trigger building_roads2
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= roads

    Affects GoodTrader  6  Chance  40 

;------------------------------------------
Trigger building_trade
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= corn_exchange
    and Trait GovernorInclination = 1

    Affects GoodTrader  6  Chance  50 

;------------------------------------------
Trigger building_cityports
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= port

    Affects GoodTrader  6  Chance  40 

;------------------------------------------
Trigger building_castleports
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_port

    Affects GoodTrader  4  Chance  40 

;------------------------------------------
Trigger building_seatrade
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= merchants_wharf

    Affects GoodTrader  6  Chance  50 

;------------------------------------------
Trigger building_bank
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= merchant_bank

    Affects GoodTrader  6  Chance  50 

;------------------------------------------
Trigger building_caravans
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= caravan_stop

    Affects GoodTrader  6  Chance  50 

;--------- Governing - Administrator Traits --------------
;------------------------------------------
Trigger building_TownHalls
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= town_hall

    Affects GoodAdministrator  1  Chance  20 

;------------------------------------------
Trigger governing2
    WhenToTest GovernorUnitTrained

    Condition GovernorTaxLevel > tax_high

    Affects GoodAdministrator  1  Chance  3 

;------------------------------------------
Trigger governing4
    WhenToTest GovernorBuildingCompleted

    Condition GovernorTaxLevel >= tax_high

    Affects GoodAdministrator  1  Chance  7 

;------------------------------------------
Trigger governing16
    WhenToTest GovernorCityRiots

    Condition GovernorTaxLevel > tax_low

    Affects BadAdministrator  1  Chance  17

;------------------------------------------
Trigger governing17
    WhenToTest GovernorCityRebels

    Condition GovernorTaxLevel > tax_low

    Affects BadAdministrator  1  Chance  85 

;-------- Governing - Farms/Mines Traits -----------
;------------------------------------------
Trigger building_farms
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= farms

    Affects GoodFarmer  1  Chance  25 

;------------------------------------------
Trigger building_mines_city
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= mines

    Affects GoodMiner  1  Chance  17

;------------------------------------------
Trigger building_mines_castle
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_mines

    Affects GoodMiner  1  Chance  10

;--------- Governing - Taxman Traits --------------
;------------------------------------------
Trigger governing18
    WhenToTest GovernorBuildingCompleted

    Condition GovernorLoyaltyLevel = loyalty_disillusioned
          and GovernorTaxLevel > tax_high

    Affects GoodTaxman  1  Chance  45 

;------------------------------------------
Trigger governing19
    WhenToTest GovernorBuildingCompleted

    Condition GovernorLoyaltyLevel > loyalty_disillusioned
    and GovernorTaxLevel < tax_high
    and not SettlementType castle

    Affects BadTaxman 1 Chance 2

;--------- Governing - Spy Traits --------------
;------------------------------------------
Trigger spying_target
    WhenToTest ExecutesASpyOnAMission

    Affects CounterSpy  1  Chance  100 

;------------------------------------------
Trigger assassination_target
    WhenToTest ExecutesAnAssassinOnAMission

    Affects AssassinCatcher  1  Chance  100 

;-------- Governing - Chivalry/Dread Traits -----------
;------------------------------------------
Trigger governing6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and GovernorTaxLevel = tax_low
          and GovernorLoyaltyLevel = loyalty_happy
          and TimeInRegion > 3

    Affects StrategyChivalry  1  Chance  25 

;------------------------------------------
Trigger governing7
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and GovernorTaxLevel = tax_low
          and GovernorLoyaltyLevel > loyalty_disillusioned
          and Treasury < 10000
          and TimeInRegion > 3

    Affects StrategyChivalry  1  Chance  33 

;------------------------------------------
Trigger governing8
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and GovernorTaxLevel = tax_extortionate
          and GovernorLoyaltyLevel < loyalty_happy
          and Treasury > 10000
          and TimeInRegion > 3

    Affects StrategyDread  1  Chance  33 

;------------------------------------------
Trigger governing10
    WhenToTest GovernorAgentCreated

    Condition AgentType = assassin

    Affects StrategyDread  1  Chance  33 

;------------------------------------------
Trigger governing11
    WhenToTest GovernorAgentCreated

    Condition AgentType = spy

    Affects StrategyDread  1  Chance  10 

;------------------------------------------
Trigger building_religion_catholic
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= small_church

    Affects ReligiousActivity  1  Chance  20 
    Affects StrategyChivalry  1  Chance  17 

;------------------------------------------
Trigger building_religion_orthodox
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= small_church_o

    Affects ReligiousActivity  1  Chance  20
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_islam
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= small_masjid

    Affects ReligiousActivity  1  Chance  20
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_catholic_c
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= small_chapel

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_orthodox_c
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= small_chapel_o

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_islam_c
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_small_masjid

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_citydievas
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= dievas_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_castledievas
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_dievas_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_cityperkunas
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= perkunas_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyDread  1  Chance  17

;------------------------------------------
Trigger building_religion_castleperkunas
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_perkunas_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyDread  1  Chance  17

;------------------------------------------
Trigger building_religion_citygiltine
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= giltine_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyDread  1  Chance  17

;------------------------------------------
Trigger building_religion_castlegiltine
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_giltine_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyDread  1  Chance  17

;------------------------------------------
Trigger building_religion_citytengir
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= tengir_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_religion_castletengir
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_tengir_altar

    Affects ReligiousActivity  1  Chance  17
    Affects StrategyChivalry  1  Chance  17

;------------------------------------------
Trigger building_tourney
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= jousting_lists

    Affects StrategyChivalry  1  Chance  40

;------------------------------------------
Trigger building_castletowers
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= c_ballista_towers

    Affects StrategyDread  1  Chance  40

;------------------------------------------
Trigger building_citytowers
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= ballista_towers

    Affects StrategyDread  1  Chance  40

;------------------------------------------
Trigger extermination3
    WhenToTest OccupySettlement

    Affects StrategyChivalry  1  Chance  85

;------------------------------------------
;Trigger agents24
;    WhenToTest RefuseBribe
;
;    Condition Trait StrategyChivalry > 0
;
;    Affects StrategyChivalry  1  Chance  85 
;
;-------- Governing - Bad Things -----------
;------------------------------------------
Trigger governing_Not_Building
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and BuildingQueueIdleDespiteCash
          and TimeInRegion > 3

    Affects BadBuilder  1  Chance  5 

;------------------------------------------
Trigger building_brothels
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= brothel

    Affects Drink  1  Chance  5 
    Affects Gambling  1  Chance  5 
    Affects Girls  1  Chance  5 

;------------------------------------------
Trigger governing12
    WhenToTest GovernorCityRiots

    Affects Disciplinarian  1  Chance  10 
    Affects HarshJustice  1  Chance  5 
    Affects Rabblerouser  1  Chance  10 
    Affects Authoritarian  1  Chance  20 

;------------------------------------------
Trigger governing13
    WhenToTest GovernorCityRebels

    Affects Disciplinarian  1  Chance  15 
    Affects HarshJustice  1  Chance  10 
    Affects Rabblerouser  1  Chance  20 
    Affects Authoritarian  1  Chance  33 

;------------------------------------------
Trigger agents9
    WhenToTest SufferAssassinationAttempt

    Affects Paranoia  1  Chance  33 
    Affects HighPersonalSecurity  1  Chance  17 
    Affects Gambling  1  Chance  15 
    Affects Girls  1  Chance  20 
    Affects Drink  1  Chance  20 

;------------------------------------------
Trigger luxurious_lifestyle_inns
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= coaching_house
          and not Trait Upright > 0
          and not Trait Prim > 0

    Affects Aesthetic  1  Chance  3 
    Affects Drink  1  Chance  3 
    Affects ExpensiveTastes  1  Chance  3 
    Affects Gambling  1  Chance  2 
    Affects Girls  1  Chance  2 

;------------------------------------------
Trigger luxurious_lifestyle_theatres
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= theatre

    Affects Aesthetic  1  Chance  5 
    Affects Epicurean  1  Chance  5 
    Affects ExpensiveTastes  1  Chance  5 
    Affects Cultured  1  Chance  15 

;------------------------------------------
Trigger luxurious_lifestyle4
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists = pleasure_palace
          and not Trait Upright > 0
          and not Trait Prim > 0

    Affects Aesthetic  1  Chance  5 
    Affects Epicurean  1  Chance  5 
    Affects ExpensiveTastes  1  Chance  5 
    Affects Gambling  1  Chance  3 
    Affects Girls  1  Chance  10 

;------------------------------------------
Trigger luxurious_lifestyle5
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= merchants_quarter

    Affects Aesthetic  1  Chance  5 
    Affects Epicurean  1  Chance  5 
    Affects ExpensiveTastes  1  Chance  5 
    Affects Gambling  1  Chance  3 
    Affects GoodTrader  1  Chance  10 

;------------------------------------------
Trigger luxurious_banks
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= merchant_bank

    Affects Corrupt  1  Chance  1 

;------------------------------------------
Trigger luxurious_lifestyle_sanitation
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= public_baths

    Affects HaleAndHearty  1  Chance  10 
    Affects Epicurean  1  Chance  5 
    Affects Girls  1  Chance  3 

;------------------------------------------
Trigger agents10
    WhenToTest SufferAssassinationAttempt

    Condition Trait Paranoia >= 3

    Affects Deranged  1  Chance  17 

;------------------------------------------
Trigger agents11
    WhenToTest SufferAssassinationAttempt

    Affects Xenophobia  1  Chance  8 
    Affects Introvert  1  Chance  25
    Affects Deranged  1  Chance  3   

;------------------------------------------
Trigger agents21
    WhenToTest AcceptBribe

    Affects Disloyal  1  Chance  33 
    Affects ExRebel  1  Chance  100 
    Affects Xenophilia  1  Chance  10 

;------------------------------------------
Trigger agents22
    WhenToTest AcceptBribe

    Condition Trait StrategyChivalry > 0

    Affects StrategyDread  4  Chance  85 

;------------------------------------------
Trigger agents56
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch > 0
          and HighestAttAdjacentChar Magic witch < 4

    Affects StrickenSilly  1  Chance  8 

;------------------------------------------
Trigger agents57
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 4
          and HighestAttAdjacentChar Magic witch < 7

    Affects Cursed  1  Chance  10 
    Affects StrickenSilly  1  Chance  5 

;------------------------------------------
Trigger agents58
    WhenToTest CharacterTurnStart

    Condition HighestAttAdjacentChar Magic witch >= 7

    Affects Cursed  1  Chance  15 
    Affects StrickenSerious  1  Chance  10 
    Affects StrickenSilly  1  Chance  2

;-------- Governing - Misc Traits -----------
;------------------------------------------
Trigger building_academic
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= alchemists_lab
          and Trait Intelligent < 2

    Affects Intelligent  1  Chance  45

;------------------------------------------
Trigger sitting_around_town_with_academia
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and RemainingMPPercentage = 100
          and SettlementBuildingExists >= alchemists_lab

    Affects Intelligent  1  Chance  10 

;------------------------------------------
Trigger building_university
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= university

    Affects Intelligent  1  Chance  45

;------------------------------------------
Trigger building_academia
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= library
          and Trait Intelligent < 2

    Affects Intelligent  1  Chance  33 

;------------------------------------------
Trigger building_art
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= artist_studio

    Affects Cultured  1  Chance  90
    Affects Aesthetic  1  Chance  20 

;------------------------------------------
Trigger building_music
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= theatre

    Affects Cultured  1  Chance  40

;------------------------------------------
Trigger building_sanitation
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= public_baths

    Affects Cultured  1  Chance  25 

;------------------------------------------
Trigger building_bullring
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished = plaza_del_toro

    Affects Cultured  1  Chance  20 

;------------------------------------------
Trigger building_ikoner
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= ikoner_studio

    Affects Cultured  1  Chance  15
    Affects PublicFaith  1  Chance  15 

;------------------------------------------
Trigger building_academia_poet1
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= library
    and CultureType middle_eastern
    and Attribute Chivalry > 0

    Affects Poet  1  Chance  15 

;------------------------------------------
Trigger building_academia_poet2
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= library
    and not CultureType middle_eastern
    and Attribute Chivalry > 0

    Affects Poet  1  Chance  8 

;------------------------------------------
Trigger building_religion_c
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= cathedral
    and not IsFactionLeader ;seperate trigger

    Affects PublicFaith  1  Chance  50 

;------------------------------------------
Trigger building_religion_c
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= cathedral_o
    and not IsFactionLeader ;seperate trigger

    Affects PublicFaith  1  Chance  50 

;------------------------------------------
Trigger building_religion_c
    WhenToTest GovernorBuildingCompleted

    Condition SettlementBuildingFinished >= jama
    and not IsFactionLeader ;seperate trigger

    Affects PublicFaith  1  Chance  50 

;------------------------------------------
;Trigger agents23
;    WhenToTest RefuseBribe
;
;    Affects Loyal  1  Chance  100 
;    Affects Upright  1  Chance  33 
;
;*********  CHARACTERBECOMESAFATHER TRIGGERS  *********
;------------------------------------------
Trigger family16
    WhenToTest CharacterBecomesAFather

    Condition Trait Girls >= 1

    Affects Prim  1  Chance  40 

;------------------------------------------
Trigger family17
    WhenToTest CharacterBecomesAFather

    Condition Trait Girls >= 2

    Affects Prim  2  Chance  30 

;------------------------------------------
Trigger family18
    WhenToTest CharacterBecomesAFather

    Condition Trait Girls >= 3

    Affects Prim  3  Chance  40 

;------------------------------------------
Trigger family19
    WhenToTest CharacterBecomesAFather

    Condition Trait Girls >= 4

    Affects Prim  4 Chance  20 

;------------------------------------------
Trigger family20
    WhenToTest CharacterBecomesAFather

    Condition Trait Drink >= 2

    Affects Sobriety  1  Chance  40 

;------------------------------------------
Trigger family21
    WhenToTest CharacterBecomesAFather

    Condition Trait Drink >= 3

    Affects Sobriety  2  Chance  30 

;------------------------------------------
Trigger family22
    WhenToTest CharacterBecomesAFather

    Condition Trait Drink >= 4

    Affects Sobriety  4  Chance  40 

;------------------------------------------
Trigger family23
    WhenToTest CharacterBecomesAFather

    Condition Trait Drink >= 5

    Affects Sobriety  8  Chance  20 

;------------------------------------------
Trigger family24
    WhenToTest CharacterBecomesAFather

    Affects Sobriety  1  Chance  5 
    Affects Prim  1  Chance  5 
    Affects Drink  1  Chance  5 
    Affects Girls  1  Chance  5 
    Affects Sane  1  Chance  10 

;*********  RELIGION TRIGGERS  *********
;------------------------------------------
Trigger disaster
    WhenToTest CharacterDamagedByDisaster

    Condition RandomPercent < 96

    Affects Superstitious  1  Chance  5
    Affects Deranged  1  Chance  1

;------------------------------------------
Trigger agents44
    WhenToTest SufferDenouncementAttempt

    Condition IsGeneral

    Affects ForcedReligious  1  Chance  50

;------------------------------------------
Trigger governing5
    WhenToTest GovernorAgentCreated

    Condition AgentType = priest

    Affects ReligiousActivity  1  Chance  17

;------------------------------------------
Trigger extermination4
    WhenToTest ExterminatePopulation

    Condition IsGeneral
          and PopulationOwnReligion > 66

    Affects PublicAtheism  2  Chance  85  ;he might get away with it.

;------------------------------------------
Trigger extermination5
    WhenToTest SackSettlement

    Condition IsGeneral
          and PopulationOwnReligion > 50

    Affects PublicAtheism  1  Chance  66

;------------------------------------------
;Is this man sympathetic to heritical religions!? 
Trigger extermination6
    WhenToTest OccupySettlement

    Condition IsGeneral
          and PopulationOwnReligion < 40  

    Affects PublicAtheism  1  Chance  50

;------------------------------------------
;character is spreading the faith in lands of the heretics
Trigger contemplative_lifestyle
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
    and SettlementBuildingExists >= small_church
    and PopulationOwnReligion < 50

    Affects PublicFaith  1  Chance  5

;------------------------------------------
;character is spreading the faith in lands of the heretics
Trigger contemplative_lifestyle1
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
    and SettlementBuildingExists >= small_church_o
    and PopulationOwnReligion < 50

    Affects PublicFaith  1  Chance  5

;------------------------------------------
;character is spreading the faith in lands of the heretics
Trigger contemplative_lifestyle2
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
    and SettlementBuildingExists >= small_masjid
    and PopulationOwnReligion < 50

    Affects PublicFaith  1  Chance  5

;------------------------------------------
;character is spreading the faith in lands of the heretics
Trigger contemplative_lifestyle3
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
    and SettlementBuildingExists >= small_chapel
    and PopulationOwnReligion < 50

    Affects PublicFaith  1  Chance  5

;------------------------------------------
;character is spreading the faith in lands of the heretics
Trigger contemplative_lifestyle4
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
    and SettlementBuildingExists >= small_chapel_o
    and PopulationOwnReligion < 50

    Affects PublicFaith  1  Chance  5

;------------------------------------------
;character is spreading the faith in lands of the heretics
Trigger contemplative_lifestyle5
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
    and SettlementBuildingExists >= c_small_masjid
    and PopulationOwnReligion < 50

    Affects PublicFaith  1  Chance  5

;*********  PERSONALITY - COMESOFAGE TRIGGERS  *********
;------------------------------------------
; up bloodlinemale fertility just a tad.
Trigger Male_royal_fertile_bonus
    WhenToTest CharacterComesOfAge

    Condition Trait SonofKingPrince = 1

    Affects Fertile 1 Chance 75
    Affects Fertile 1 Chance 20

;------------------------------------------
Trigger dads_a_bit_drunk_vnv_trigger
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Drink >= 1
          and FatherTrait Drink <= 2

    Affects Sobriety  3  Chance  33 
    Affects Drink  1  Chance  17 

;------------------------------------------
Trigger dads_more_drunk_vnv_trigger
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Drink >= 3
          and FatherTrait Drink <= 4

    Affects Sobriety  9  Chance  17 
    Affects Drink  1  Chance  17 

;------------------------------------------
Trigger dads_totally_drunk_vnv_trigger
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Drink >= 5
          and FatherTrait Drink <= 6

    Affects Sobriety  18  Chance  90 
    Affects Drink  1  Chance  17 

;------------------------------------------
Trigger dads_austere
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Austere >= 1

    Affects Aesthetic  1  Chance  20 
    Affects Austere  1  Chance  5 

;------------------------------------------
Trigger dads_aesthetic
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Aesthetic >= 1

    Affects Austere  1  Chance  15 
    Affects Aesthetic  1  Chance  15 

;------------------------------------------
Trigger dads_corrupt
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Corrupt >= 1

    Affects Upright  1  Chance  15 
    Affects Corrupt  1  Chance  15 

;------------------------------------------
Trigger dads_upright
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Upright >= 1

    Affects Upright  1  Chance  20 

;------------------------------------------
Trigger dads_coward
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Coward >= 1

    Affects Brave  1  Chance  20 

;------------------------------------------
Trigger dads_cuckold
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Cuckold >= 1

    Affects Prim  1  Chance  20 

;------------------------------------------
Trigger dads_prim
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Prim >= 1

    Affects Lewd  1  Chance  10 
    Affects Feck  1  Chance  10 

;------------------------------------------
Trigger dads_epicurean
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Epicurean >= 1

    Affects Epicurean  1  Chance  25 
    Affects Stoic  1  Chance  10 

;------------------------------------------
Trigger dads_expensive_tastes
    WhenToTest CharacterComesOfAge

    Condition FatherTrait ExpensiveTastes >= 1

    Affects ExpensiveTastes  1  Chance  25 
    Affects Cheapskate  1  Chance  10

;------------------------------------------
Trigger dads_smart
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Intelligent = 1

    Affects Intelligent  1  Chance  33

;------------------------------------------
Trigger dads_intelligent
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Intelligent = 2

    Affects Intelligent  1  Chance  33
    Affects Intelligent  1  Chance  25

;------------------------------------------
Trigger dads_genius
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Intelligent = 3

    Affects Intelligent  2  Chance  33
    Affects Intelligent  1  Chance  25  

;------------------------------------------
Trigger dad_FearsCumans
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearscuman >= 1

    Affects Hatescuman  1  Chance  25 

;------------------------------------------
Trigger dad_FearsByzantium
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsbyzantium >= 1

    Affects Hatesbyzantium  1  Chance  25 

;------------------------------------------
Trigger dad_FearsDenmark
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsdenmark >= 1

    Affects Hatesdenmark  1  Chance  25 

;------------------------------------------
Trigger dad_FearsEgypt
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsegypt >= 1

    Affects Hatesegypt  1  Chance  25 

;------------------------------------------
Trigger dad_FearsEngland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsengland >= 1

    Affects Hatesengland  1  Chance  25 

;------------------------------------------
Trigger dad_FearsFrance
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsfrance >= 1

    Affects Hatesfrance  1  Chance  25 

;------------------------------------------
Trigger dad_FearsHRE
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearshre >= 1

    Affects Hateshre  1  Chance  25 

;------------------------------------------
Trigger dad_FearsHungary
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearshungary >= 1

    Affects Hateshungary  1  Chance  25 

;------------------------------------------
Trigger dad_FearsMilan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsmilan >= 1

    Affects Hatesmilan  1  Chance  25 

;------------------------------------------
Trigger dad_FearsMongols
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsmongols >= 1

    Affects Hatesmongols  1  Chance  25 

;------------------------------------------
Trigger dad_FearsMoors
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsmoors >= 1

    Affects Hatesmoors  1  Chance  25 

;------------------------------------------
Trigger dad_FearsPapal_States
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearspapal_states >= 1

    Affects Hatespapal_states  1  Chance  25 

;------------------------------------------
Trigger dad_FearsPoland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearspoland >= 1

    Affects Hatespoland  1  Chance  25 

;------------------------------------------
Trigger dad_FearsPortugal
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsportugal >= 1

    Affects Hatesportugal  1  Chance  25 

;------------------------------------------
Trigger dad_FearsRussia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsrussia >= 1

    Affects Hatesrussia  1  Chance  25 

;------------------------------------------
Trigger dad_FearsScotland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsscotland >= 1

    Affects Hatesscotland  1  Chance  25 

;------------------------------------------
Trigger dad_FearsSicily
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearssicily >= 1

    Affects Hatessicily  1  Chance  25 

;------------------------------------------
Trigger dad_FearsSlave
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsslave >= 1

    Affects Hatesslave  1  Chance  25 

;------------------------------------------
Trigger dad_FearsSpain
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsspain >= 1

    Affects Hatesspain  1  Chance  25 

;------------------------------------------
Trigger dad_FearsTurks
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsturks >= 1

    Affects Hatesturks  1  Chance  25 

;------------------------------------------
Trigger dad_hatesCumans
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatescuman >= 1

    Affects Hatescuman  1  Chance  25 

;------------------------------------------
Trigger dad_hatesByzantium
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesbyzantium >= 1

    Affects Hatesbyzantium  1  Chance  25 

;------------------------------------------
Trigger dad_hatesDenmark
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesdenmark >= 1

    Affects Hatesdenmark  1  Chance  25 

;------------------------------------------
Trigger dad_hatesEgypt
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesegypt >= 1

    Affects Hatesegypt  1  Chance  25 

;------------------------------------------
Trigger dad_hatesEngland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesengland >= 1

    Affects Hatesengland  1  Chance  25 

;------------------------------------------
Trigger dad_hatesFrance
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesfrance >= 1

    Affects Hatesfrance  1  Chance  25 

;------------------------------------------
Trigger dad_hatesHRE
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hateshre >= 1

    Affects Hateshre  1  Chance  25 

;------------------------------------------
Trigger dad_hatesHungary
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hateshungary >= 1

    Affects Hateshungary  1  Chance  25 

;------------------------------------------
Trigger dad_hatesMilan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesmilan >= 1

    Affects Hatesmilan  1  Chance  25 

;------------------------------------------
Trigger dad_hatesMongols
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesmongols >= 1

    Affects Hatesmongols  1  Chance  25 

;------------------------------------------
Trigger dad_hatesMoors
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesmoors >= 1

    Affects Hatesmoors  1  Chance  25 

;------------------------------------------
Trigger dad_hatesPapal_States
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatespapal_states >= 1

    Affects Hatespapal_states  1  Chance  25 

;------------------------------------------
Trigger dad_hatesPoland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatespoland >= 1

    Affects Hatespoland  1  Chance  25 

;------------------------------------------
Trigger dad_hatesPortugal
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesportugal >= 1

    Affects Hatesportugal  1  Chance  25 

;------------------------------------------
Trigger dad_hatesRussia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesrussia >= 1

    Affects Hatesrussia  1  Chance  25 

;------------------------------------------
Trigger dad_hatesScotland
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesscotland >= 1

    Affects Hatesscotland  1  Chance  25 

;------------------------------------------
Trigger dad_hatesSicily
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatessicily >= 1

    Affects Hatessicily  1  Chance  25 

;------------------------------------------
Trigger dad_hatesSlave
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesslave >= 1

    Affects Hatesslave  1  Chance  25 

;------------------------------------------
Trigger dad_hatesSpain
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesspain >= 1

    Affects Hatesspain  1  Chance  25 

;------------------------------------------
Trigger dad_hatesTurks
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesturks >= 1

    Affects Hatesturks  1  Chance  25

;------------------------------------------
Trigger dad_hatesHeretics
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesheretic >= 1

    Affects Hatesheretic  1  Chance  25

;------------------------------------------
Trigger dad_fearsHeretics
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsheretic >= 1

    Affects Fearsheretic  1  Chance  25

;------------------------------------------
Trigger dad_hatesPagan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatespagan >= 1

    Affects Hatespagan  1  Chance  25

;------------------------------------------
Trigger dad_fearsPagan
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearspagan >= 1

    Affects Fearspagan  1  Chance  25

;------------------------------------------
Trigger dad_hatesOrthodox
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesorthodox >= 1

    Affects Hatesorthodox  1  Chance  25

;------------------------------------------
Trigger dad_fearsOrthodox
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsorthodox >= 1

    Affects Fearsorthodox  1  Chance  25

;------------------------------------------
Trigger dad_hatesCatholic
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatescatholic >= 1

    Affects Hatescatholic  1  Chance  25

;------------------------------------------
Trigger dad_fearsCatholic
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearscatholic >= 1

    Affects Fearscatholic  1  Chance  25

;------------------------------------------
Trigger dad_hatesIslam 
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Hatesislam >= 1 

    Affects Hatesislam  1  Chance  25

;------------------------------------------
Trigger dad_fearsIslam
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fearsislam >= 1

    Affects Fearsislam  1  Chance  25 

;------------------------------------------
Trigger dad_generous
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Generous >= 1

    Affects Miserly  1  Chance  33 
    Affects Generous  1  Chance  10 

;------------------------------------------
Trigger dad_mean
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Miserly >= 1

    Affects Generous  1  Chance  15 
    Affects Miserly  1  Chance  25 

;------------------------------------------
Trigger dad_tourneyknight
    WhenToTest CharacterComesOfAge

    Condition FatherTrait TourneyKnight >= 1

    Affects TourneyKnight  1  Chance  20 

;------------------------------------------
Trigger dad_likes_girls
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Girls >= 1

    Affects Girls  1  Chance  20 

;------------------------------------------
Trigger dads_haemophobic
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Haemophobic >= 1

    Affects Bloodthirsty  1  Chance  20 

;------------------------------------------
Trigger dads_handsome
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Handsome >= 1

    Affects Handsome  1  Chance  33 
    Affects Handsome  1  Chance  25 

;------------------------------------------
Trigger dads_handsome2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Handsome >= 2

    Affects Handsome  1  Chance  33 
    Affects Handsome  1  Chance  25 

;------------------------------------------
Trigger dads_handsome3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Handsome >= 3

    Affects Handsome  1  Chance  33 
    Affects Handsome  1  Chance  25 

;------------------------------------------
Trigger dads_Ugly
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ugly >= 1

    Affects Ugly  1  Chance  33 
    Affects Ugly  1  Chance  25 

;------------------------------------------
Trigger dads_Ugly2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ugly >= 2

    Affects Ugly  1  Chance  33 
    Affects Ugly  1  Chance  25 

;------------------------------------------
Trigger dads_Ugly3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ugly >= 3

    Affects Ugly  1  Chance  33 
    Affects Ugly  1  Chance  25 

;------------------------------------------
Trigger dads_Inbred
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Inbred >= 1

    Affects Inbred  1  Chance  33 
    Affects Inbred  1  Chance  25 

;------------------------------------------
Trigger dads_Inbred2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Inbred >= 2

    Affects Inbred  1  Chance  33 
    Affects Inbred  1  Chance  25 

;------------------------------------------
Trigger dads_Inbred3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Inbred >= 3

    Affects Inbred  1  Chance  33 
    Affects Inbred  1  Chance  25 

;------------------------------------------
Trigger dads_Inbred4
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Inbred >= 4

    Affects Inbred  1  Chance  33 
    Affects Inbred  1  Chance  25 

;------------------------------------------
Trigger dads_Inbred5
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Inbred >= 5

    Affects Inbred  1  Chance  33 
    Affects Inbred  1  Chance  25 

;------------------------------------------
Trigger dads_infertile
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Infertile >= 1

    Affects Infertile  1  Chance  17 

;------------------------------------------
Trigger dads_infertile2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Infertile >= 2

    Affects Infertile  1  Chance  33 

;------------------------------------------
Trigger dads_paranoid
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Paranoia >= 2

    Affects Paranoia  1  Chance  20 

;------------------------------------------
Trigger dads_perverted
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Perverted >= 2

    Affects Perverted  1  Chance  20 

;------------------------------------------
Trigger dads_Prim
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Prim >= 1

    Affects Prim  1  Chance  20 

;------------------------------------------
Trigger dads_PublicAtheism
    WhenToTest CharacterComesOfAge

    Condition FatherTrait PublicAtheism >= 1

    Affects PublicAtheism  1  Chance  20 

;------------------------------------------
Trigger dads_PublicFaith
    WhenToTest CharacterComesOfAge

    Condition FatherTrait PublicFaith >= 1

    Affects PublicFaith  1  Chance  20 

;------------------------------------------
Trigger dads_Slothful
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Slothful >= 1

    Affects Slothful  1  Chance  20 

;------------------------------------------
Trigger dads_SmoothTalker
    WhenToTest CharacterComesOfAge

    Condition FatherTrait InspiringSpeaker  >= 1

    Affects InspiringSpeaker  1  Chance  20 

;------------------------------------------
Trigger dads_Stoic
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Stoic >= 1

    Affects Stoic  1  Chance  20 

;------------------------------------------
Trigger dads_Military_Edu
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Military_Edu >= 3

    Affects Military_Edu  1  Chance  20 

;------------------------------------------
Trigger dads_Superstitious
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Superstitious >= 1

    Affects Superstitious  1  Chance  20 

;------------------------------------------
Trigger dads_Pragmatic
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Pragmatic >= 1

    Affects Pragmatic  1  Chance  20 

;------------------------------------------
Trigger dads_Xenophilia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Xenophilia >= 1

    Affects Xenophilia  1  Chance  20 

;------------------------------------------
Trigger dads_Xenophobia
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Xenophobia >= 1

    Affects Xenophobia  1  Chance  20 

;------------------------------------------
Trigger dads_Cultured
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Cultured >= 1

    Affects Cultured  1  Chance  20 

;------------------------------------------
Trigger dads_NaturalMilitaryTalent
    WhenToTest CharacterComesOfAge

    Condition FatherTrait NaturalMilitarySkill >= 1

    Affects NaturalMilitarySkill  1  Chance  17 

;------------------------------------------
Trigger dads_authoritarian
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Authoritarian >= 1

    Affects NonAuthoritarian  1  Chance  33 
    Affects KindRuler  1  Chance  20 

;------------------------------------------
Trigger dads_kindruler
    WhenToTest CharacterComesOfAge

    Condition FatherTrait KindRuler >= 1

    Affects KindRuler  1  Chance  33 
    Affects HarshRuler  1  Chance  33 

;------------------------------------------
Trigger dads_proudlegacy
    WhenToTest CharacterComesOfAge

    Condition FatherTrait FactionKiller >= 1

    Affects FathersLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_proudlegacy2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait FactionKiller >= 2

    Affects FathersLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_proudlegacy3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait FactionKiller >= 3

    Affects FathersLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_chivalrylegacy
    WhenToTest CharacterComesOfAge

    Condition FatherAttribute Chivalry >= 4

    Affects ChivalryLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_chivalrylegacy1
    WhenToTest CharacterComesOfAge

    Condition FatherAttribute Chivalry >= 7

    Affects ChivalryLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_dreadlegacy2
    WhenToTest CharacterComesOfAge

    Condition FatherAttribute Chivalry <= -4

    Affects DreadLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_dreadlegacy3
    WhenToTest CharacterComesOfAge

    Condition FatherAttribute Chivalry <= -7

    Affects DreadLegacy  1  Chance  100 

;------------------------------------------
Trigger dads_gregarious
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Gregarious >= 1

    Affects Gregarious  1  Chance  20 

;------------------------------------------
Trigger dads_introverted
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Introvert >= 1

    Affects Introvert  1  Chance  20 

;------------------------------------------
Trigger fixed_birth1
    WhenToTest CharacterComesOfAge

    Affects LoyaltyStarter  1  Chance  100 
    Affects ReligionStarter  1  Chance  100 

;------------------------------------------
Trigger random_birth1
    WhenToTest CharacterComesOfAge

    Affects Aesthetic  1  Chance  3 
    Affects Coward  2  Chance  2 
    Affects Cultured  1  Chance  5 

;------------------------------------------
Trigger random_birth2
    WhenToTest CharacterComesOfAge

    Affects Anger  1  Chance  2 
    Affects Hypochondriac  1  Chance  2 

;------------------------------------------
Trigger random_birth3
    WhenToTest CharacterComesOfAge

    Affects GoodTaxman  1  Chance  4 
    Affects DeceiverVirtue  1  Chance  4 
    Affects TouchedByTheGods  1  Chance  2 
    Affects Upright  1  Chance  4 

;------------------------------------------
Trigger random_birth4
    WhenToTest CharacterComesOfAge

    Affects GoodTrader  12  Chance  2 
    Affects Liar  1  Chance  3 

;------------------------------------------
Trigger random_birth5
    WhenToTest CharacterComesOfAge

    Affects Arse  1  Chance  1 
    Affects Disciplinarian  1  Chance  4 
    Affects Haemophobic  1  Chance  2 

;------------------------------------------
Trigger random_birth6
    WhenToTest CharacterComesOfAge

    Affects Austere  1  Chance  2 
    Affects Disloyal  1  Chance  2 
    Affects HaleAndHearty  3  Chance  2 

;------------------------------------------
Trigger random_birth7
    WhenToTest CharacterComesOfAge

    Affects HaleAndHearty  3  Chance  2 
    Affects Authoritarian  1  Chance  2 
    Affects Drink  1  Chance  2 
    Affects Handsome  1  Chance  5 

;------------------------------------------
Trigger random_birth8
    WhenToTest CharacterComesOfAge

    Affects Embezzler  1  Chance  2 
    Affects HarshJustice  1  Chance  2 

;------------------------------------------
Trigger random_birth9
    WhenToTest CharacterComesOfAge

    Affects GoodAdministrator  1  Chance  2 
    Affects BadAdministrator  1  Chance  2 
    Affects Energetic  1  Chance  4 
    Affects HarshRuler  1  Chance  2 

;------------------------------------------
Trigger random_birth10
    WhenToTest CharacterComesOfAge

    Affects Epicurean  1  Chance  2 

;------------------------------------------
Trigger random_birth11
    WhenToTest CharacterComesOfAge

    Affects ExpensiveTastes  1  Chance  2 
    Affects Prim  1  Chance  2 

;------------------------------------------
Trigger random_birth12
    WhenToTest CharacterComesOfAge

    Affects GoodBuilder  6  Chance  2 
    Affects BadBuilder  1  Chance  2 
    Affects Feck  1  Chance  2 
    Affects SmoothTalker  1  Chance  2 

;------------------------------------------
Trigger random_birth13
    WhenToTest CharacterComesOfAge

    Affects BadCavalryGeneral  1  Chance  2 
    Affects Fertile  1  Chance  4 
    Affects Ugly  1  Chance  2 

;------------------------------------------
Trigger random_birth14
    WhenToTest CharacterComesOfAge

    Affects GoodCommander  1  Chance  2 
    Affects BadCommander  1  Chance  2 
    Affects MathematicsSkill  1  Chance  2 

;------------------------------------------
Trigger random_birth15
    WhenToTest CharacterComesOfAge

    Affects Intelligent  1  Chance  3 
    Affects Gambling  1  Chance  2 

;------------------------------------------
Trigger random_birth16
    WhenToTest CharacterComesOfAge

    Affects Corrupt  1  Chance  2 
    Affects PublicAtheism  1  Chance  2 

;------------------------------------------
Trigger random_birth17
    WhenToTest CharacterComesOfAge

    Affects BadDisciplinarian  1  Chance  2 
    Affects Loyal  1  Chance  2 
    Affects PublicFaith  1  Chance  5 

;------------------------------------------
Trigger random_birth18
    WhenToTest CharacterComesOfAge

    Affects BadEngineer  1  Chance  2 
    Affects Generous  1  Chance  2 
    Affects InspiringSpeaker  1  Chance  4 

;------------------------------------------
Trigger random_birth19
    WhenToTest CharacterComesOfAge

    Affects Girls  1  Chance  2 
    Affects NightBattleCapable  1  Chance  10 

;------------------------------------------
Trigger random_birth20
    WhenToTest CharacterComesOfAge

    Affects BadInfantryGeneral  1  Chance  2 
    Affects Slothful  1  Chance  2 
    Affects Gregarious  1  Chance  20 

;------------------------------------------
Trigger random_birth21
    WhenToTest CharacterComesOfAge

    Affects GoodAdministrator  1  Chance  4 
    Affects Stoic  1  Chance  2 

;------------------------------------------
Trigger random_birth21a
    WhenToTest CharacterComesOfAge

    Affects Introvert  1  Chance  5 

;------------------------------------------
Trigger random_birth22
    WhenToTest CharacterComesOfAge

    Affects Superstitious  1  Chance  2 
    Affects Xenophilia  1  Chance  2 
    Affects GoodBuilder  6  Chance  5 

;------------------------------------------
Trigger random_birth26
    WhenToTest CharacterComesOfAge

    Affects BadTaxman  1  Chance  2 
    Affects GoodCommander  1  Chance  4 
    Affects Xenophobia  1  Chance  2 

;------------------------------------------
Trigger random_birth27
    WhenToTest CharacterComesOfAge

    Affects BadTrader  1  Chance  2 
    Affects GoodConspirator  1  Chance  2 
    Affects Ignorance  1  Chance  1 
    Affects Miserly  1  Chance  3 

;------------------------------------------
Trigger random_birth28
    WhenToTest CharacterComesOfAge

    Affects Inbred  1  Chance  1 

;------------------------------------------
Trigger random_birth29
    WhenToTest CharacterComesOfAge

    Affects GoodEngineer  1  Chance  2 
    Affects Sane  1  Chance  5 

;------------------------------------------
Trigger random_birth30
    WhenToTest CharacterComesOfAge

    Affects Bloodthirsty  1  Chance  2 
    Affects GoodFarmer  3  Chance  2 
    Affects Infertile  1  Chance  2 
    Affects DeceiverVirtue  1  Chance  2 

;------------------------------------------
Trigger random_birth31
    WhenToTest CharacterComesOfAge

    Affects BoringSpeaker  1  Chance  2 
    Affects Deranged  1  Chance  2 
    Affects Secretive  1  Chance  4 

;------------------------------------------
Trigger random_birth32
    WhenToTest CharacterComesOfAge

    Affects Brave  1  Chance  8 
    Affects GoodMiner  1  Chance  2 
    Affects Just  1  Chance  2 
    Affects Unjust  1  Chance  2 

;------------------------------------------
Trigger random_birth33
    WhenToTest CharacterComesOfAge

    Affects Cheapskate  1  Chance  2 
    Affects LenientJustice  1  Chance  2 
    Affects Upright  1  Chance  3 

;------------------------------------------
Trigger random_birth34
    WhenToTest CharacterComesOfAge

    Affects Lewd  1  Chance  2 
    Affects Trusting  1  Chance  4 
    Affects Talkative  1  Chance  4 

;------------------------------------------
Trigger random_birth_england
    WhenToTest CharacterComesOfAge

    Condition FactionType england

    Affects Hatesfrance  1  Chance  4 
    Affects Hatesscotland  1  Chance  4 
    Affects Brave  1  Chance  4 
    Affects Ugly  1  Chance  4 

;------------------------------------------
Trigger random_birth_scotland
    WhenToTest CharacterComesOfAge

    Condition FactionType scotland

    Affects Hatesengland  1  Chance  4 
    Affects Feck  1  Chance  4 
    Affects Miserly  1  Chance  4 
    Affects HaleAndHearty  3  Chance  4
    Affects Robust  1  Chance  4 
    Affects Rabblerouser  1  Chance  4 

;------------------------------------------
Trigger random_birth_france
    WhenToTest CharacterComesOfAge

    Condition FactionType france

    Affects Hatesengland  1  Chance  4 
    Affects Brave  1  Chance  4 
    Affects Drink  1  Chance  4 
    Affects StrategyChivalry  1  Chance  4 

;------------------------------------------
Trigger random_birth_hre
    WhenToTest CharacterComesOfAge

    Condition FactionType hre

    Affects PublicFaith  1  Chance  25 
    Affects HarshJustice  1  Chance  4 
    Affects Stoic  1  Chance  10 
    Affects Generous  1  Chance  5 
    Affects HarshJustice  1  Chance  4 

;------------------------------------------
Trigger random_birth_denmark
    WhenToTest CharacterComesOfAge

    Condition FactionType denmark

    Affects HaleAndHearty  3  Chance  4
    Affects Robust  1  Chance  4 
    Affects Drink  1  Chance  4 
    Affects Berserker  1  Chance  5 

;------------------------------------------
Trigger random_birth_norway
    WhenToTest CharacterComesOfAge

    Condition FactionType norway

    Affects HaleAndHearty  3  Chance  4
    Affects Robust  1  Chance  4 
    Affects Drink  1  Chance  4 
    Affects Berserker  1  Chance  5 

;------------------------------------------
Trigger random_birth_poland
    WhenToTest CharacterComesOfAge

    Condition FactionType poland

    Affects PublicFaith  1  Chance  20 
    Affects Hateshre  1  Chance  10 

;------------------------------------------
Trigger random_birth_islam
    WhenToTest CharacterComesOfAge

    Condition CharacterReligion islam

    Affects PublicFaith  1  Chance  100 
    Affects MathematicsSkill  1  Chance  10 
    Affects Hatescatholic  1  Chance  4 
    Affects GoodAdministrator  1  Chance  5
    Affects ReligiousActivity  1  Chance  8 

;------------------------------------------
Trigger random_birth_venice
    WhenToTest CharacterComesOfAge

    Condition FactionType venice

    Affects GoodAdministrator  1  Chance  10 
    Affects GoodTrader  12  Chance  10 
    Affects Hatesmilan  1  Chance  33 

;------------------------------------------
Trigger random_birth_sicily
    WhenToTest CharacterComesOfAge

    Condition FactionType sicily

    Affects PublicFaith  1  Chance  25 
    Affects HaleAndHearty  1  Chance  4 
    Affects GoodAdministrator  1  Chance  10 

;------------------------------------------
Trigger random_birth_hungary
    WhenToTest CharacterComesOfAge

    Condition FactionType hungary

    Affects Anger  1  Chance  5 
    Affects Berserker  1  Chance  5 
    Affects HaleAndHearty  3  Chance  4
    Affects Robust  1  Chance  4 
    Affects ReligiousActivity  1  Chance  5 

;------------------------------------------
Trigger random_birth_spain
    WhenToTest CharacterComesOfAge

    Condition FactionType spain

    Affects Anger  1  Chance  4 
    Affects Hatesmoors  1  Chance  10 
    Affects PublicFaith  1  Chance  25 
    Affects GoodInfantryGeneral  1  Chance  10 

;------------------------------------------
Trigger random_birth_portugal
    WhenToTest CharacterComesOfAge

    Condition FactionType portugal

    Affects GoodTrader  12  Chance  5 
    Affects GoodInfantryGeneral  1  Chance  5 
    Affects Hatesmoors  1  Chance  10 

;------------------------------------------
Trigger random_birth_moors
    WhenToTest CharacterComesOfAge

    Condition FactionType moors

    Affects Hatesportugal  1  Chance  15 
    Affects Hatesspain  1  Chance  15 

;------------------------------------------
Trigger random_birth_byzantium
    WhenToTest CharacterComesOfAge

    Condition FactionType byzantium

    Affects Corrupt  1  Chance  8 
    Affects Cultured  1  Chance  10 
    Affects Aesthetic  1  Chance  6 
    Affects HaleAndHearty  3  Chance  4
    Affects Robust  1  Chance  4 
    Affects Hatesturks  1  Chance  5 

;------------------------------------------
Trigger random_birth_byzantium2
    WhenToTest CharacterComesOfAge

    Condition FactionType byzantium

    and IsRegionOneOf 105 Constantinople_Province
    and Trait BiologicalSon = 1

    Affects BornIntoPurple  1  Chance  10 

;------------------------------------------
Trigger random_birth_byzantium3
    WhenToTest CharacterComesOfAge

    Condition FactionType byzantium

    and IsRegionOneOf 105 Constantinople_Province
    and AgentType = princess
    and not Trait BastardDaughter = 1

    Affects BornIntoPurplePrincess  1  Chance  10 

;------------------------------------------
Trigger random_birth_teutonic
    WhenToTest CharacterComesOfAge

    Condition FactionType teutonic_order

    Affects PublicFaith  1  Chance  20 
    Affects TouchedByTheGods  1  Chance  8 
    Affects Prim  1  Chance  10 
    Affects Military_Edu  1  Chance  100 

;------------------------------------------
Trigger random_birth_lithuania
    WhenToTest CharacterComesOfAge

    Condition FactionType lithuania

    Affects GoodCavalryGeneral  1  Chance  25 
    Affects NightBattleCapable  1  Chance  10 

;------------------------------------------
Trigger random_birth_cuman
    WhenToTest CharacterComesOfAge

    Condition FactionType cumans

    Affects GoodCavalryGeneral  1  Chance  25 
    Affects NightBattleCapable  1  Chance  10 
    Affects Energetic  1  Chance  10 

;------------------------------------------
Trigger random_birth_knights_templar
    WhenToTest CharacterComesOfAge

    Condition FactionType knights_templar

    Affects PublicFaith  1  Chance  20 
    Affects TouchedByTheGods  1  Chance  8 
    Affects Prim  1  Chance  10 
    Affects Military_Edu  1  Chance  100 

;------------------------------------------
Trigger random_birth_mongol
    WhenToTest CharacterComesOfAge

    Condition FactionType mongols

    Affects Eastern_Edu  1  Chance  100 
    Affects GoodCavalryGeneral  1  Chance  10 
    Affects Scout  2  Chance  4 

;------------------------------------------
Trigger random_birth42
    WhenToTest CharacterComesOfAge

    Affects NaturalMilitarySkill  1  Chance  17 

;------------------------------------------
Trigger random_birth43
    WhenToTest CharacterComesOfAge

    Condition Trait NaturalMilitarySkill >= 1

    Affects NaturalMilitarySkill  1  Chance  33 

;------------------------------------------
Trigger random_birth44
    WhenToTest CharacterComesOfAge

    Condition Trait NaturalMilitarySkill >= 2

    Affects NaturalMilitarySkill  1  Chance  33 

;------------------------------------------
Trigger random_birth45
    WhenToTest CharacterComesOfAge

    Condition Trait NaturalMilitarySkill >= 3

    Affects NaturalMilitarySkill  1  Chance  33 

;------------------------------------------
Trigger random_birth46
    WhenToTest CharacterComesOfAge

    Condition Trait Infertile >= 1

    Affects Infertile  1  Chance  33 

;------------------------------------------
Trigger random_birth47
    WhenToTest CharacterComesOfAge

    Condition Trait Infertile >= 2

    Affects Infertile  1  Chance  33 

;------------------------------------------
Trigger random_birth48
    WhenToTest CharacterComesOfAge

    Condition Trait Fertile >= 0

    Affects Fertile  1  Chance  50

;------------------------------------------
Trigger random_birth49
    WhenToTest CharacterComesOfAge

    Condition Trait Fertile >= 1

    Affects Fertile  1  Chance  33

;------------------------------------------
Trigger random_birth49a
    WhenToTest CharacterComesOfAge

    Condition Trait Fertile >= 2

    Affects Fertile  1  Chance  15

;------------------------------------------
Trigger random_birth50
    WhenToTest CharacterComesOfAge

    Condition Trait Ugly >= 1

    Affects Ugly  1  Chance  33 

;------------------------------------------
Trigger random_birth51
    WhenToTest CharacterComesOfAge

    Condition Trait Ugly >= 2

    Affects Ugly  1  Chance  33 

;------------------------------------------
Trigger random_birth52
    WhenToTest CharacterComesOfAge

    Condition Trait Ugly >= 3

    Affects Ugly  1  Chance  33 

;------------------------------------------
Trigger random_birth53
    WhenToTest CharacterComesOfAge

    Condition Trait Ugly >= 4

    Affects Ugly  1  Chance  33 

;------------------------------------------
Trigger random_birth54
    WhenToTest CharacterComesOfAge

    Condition Trait Handsome >= 1

    Affects Handsome  1  Chance  33 

;------------------------------------------
Trigger random_birth55
    WhenToTest CharacterComesOfAge

    Condition Trait Handsome >= 2

    Affects Handsome  1  Chance  33 

;------------------------------------------
Trigger random_birth56
    WhenToTest CharacterComesOfAge

    Condition Trait Handsome >= 3

    Affects Handsome  1  Chance  33 

;------------------------------------------
Trigger birth_with_academia
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = alchemists_lab

    Affects Intelligent  1  Chance  2 

;------------------------------------------
Trigger birth_with_alchemy_school
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = alchemy_school

    Affects Intelligent  1  Chance  5 

;------------------------------------------
Trigger birth_with_university
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = university

    Affects Intelligent  1  Chance  10 

;------------------------------------------
Trigger birth_with_castle_academia
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = library

    Affects Intelligent  1  Chance  5 

;------------------------------------------
Trigger birth_with_castle_academia2
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = academy

    Affects Intelligent  1  Chance  10 

;------------------------------------------
Trigger birth_with_sanitation
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = public_baths

    Affects HaleAndHearty  3  Chance  5 

;------------------------------------------
Trigger birth_with_sanitation2
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = aqueduct

    Affects HaleAndHearty  3  Chance  10 

;------------------------------------------
Trigger birth_with_religious_catholic
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists >= cathedral

    Affects PublicFaith  1  Chance  25 

;------------------------------------------
Trigger birth_with_religious_catholic2
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = huge_cathedral

    Affects PublicFaith  1  Chance  30 

;------------------------------------------
Trigger birth_with_religious_orthodox
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists >= cathedral_o

    Affects PublicFaith  1  Chance  25 

;------------------------------------------
Trigger birth_with_religious_orthodox2
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = huge_cathedral_o

    Affects PublicFaith  1  Chance  30 

;------------------------------------------
Trigger birth_with_religious_islam
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = jama

    Affects PublicFaith  1  Chance  25 

;------------------------------------------
Trigger birth_with_religious_islam2
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and FactionBuildingExists = great_jama

    Affects PublicFaith  1  Chance  30 

;*********  CRUSADE/JIHAD TRIGGERS  *********
;------------------------------------------
Trigger crusades_1
    WhenToTest GeneralJoinCrusade

    Condition IsCrusade
          and Trait CrusaderHistory < 1

    Affects CrusaderHistory  1  Chance  100 
    Affects StrategyChivalry  1  Chance  100 

;------------------------------------------
Trigger crusades_2
    WhenToTest GeneralArrivesCrusadeTargetRegion

    Condition IsCrusade

    Affects CrusaderHistory  1  Chance  100 

;------------------------------------------
Trigger crusades_3
    WhenToTest GeneralAssaultsResidence

    Condition IsOnCrusade
          and IsRegionCrusadeTarget

    Affects CrusaderHistory  1  Chance  100 

;------------------------------------------
Trigger crusades_5
    WhenToTest GeneralTakesCrusadeTarget

    Condition IsCrusade

    Affects CrusaderHistory  3  Chance  100 
    Affects StrategyChivalry  2  Chance  100 

;------------------------------------------
Trigger crusades_6
    WhenToTest GeneralAbandonCrusade


    Affects CrusaderHistory -3  Chance  100 

;------------------------------------------
Trigger crusades_7
    WhenToTest PreBattleWithdrawal

    Condition IsOnCrusade
          and IsRegionCrusadeTarget

    Affects CrusaderHistory -2  Chance  100 

;------------------------------------------
Trigger jihads_1
    WhenToTest GeneralJoinCrusade

    Condition IsJihad 
          and Trait JihadHistory < 1

    Affects JihadHistory  1  Chance  100 

;------------------------------------------
Trigger jihads_2
    WhenToTest GeneralArrivesCrusadeTargetRegion

    Condition IsJihad

    Affects JihadHistory  1  Chance  100 

;------------------------------------------
Trigger jihads_3
    WhenToTest GeneralAssaultsResidence

    Condition IsOnJihad
          and IsRegionJihadTarget

    Affects JihadHistory  1  Chance  100 

;------------------------------------------
Trigger jihads_5
    WhenToTest GeneralTakesCrusadeTarget

    Condition IsJihad

    Affects JihadHistory  3  Chance  100 

;------------------------------------------
Trigger jihads_7
    WhenToTest GeneralAbandonCrusade

    Condition IsJihad

    Affects JihadHistory -3  Chance  100 

;------------------------------------------
Trigger jihads_8
    WhenToTest PreBattleWithdrawal

    Condition IsOnJihad
          and IsRegionJihadTarget

    Affects JihadHistory -2  Chance  100 

;------------------------------------------
Trigger CrusaderViews
    WhenToTest CharacterTurnEnd

    Condition IsOnCrusade 

    Affects Hatesorthodox 1 Chance 4
    Affects Hatesislam 1 Chance 4
    Affects Hatespagan  1  Chance  4

;------------------------------------------
Trigger JihadiViews
    WhenToTest CharacterTurnEnd

    Condition IsOnJihad 

    Affects Hatescatholic 1 Chance 4
    Affects Hatesorthodox 1 Chance 4
    Affects Hatespagan  1  Chance  4

;------------------------------------------
Trigger DamnCatholicChurch
    WhenToTest CharacterTurnEnd

    Condition FactionExcommunicated 

    Affects Hatespapal_states 1 Chance 6

;------------------------------------------
Trigger ReConsiderCatholicChurch
    WhenToTest CharacterTurnEnd

    Condition not FactionExcommunicated
          and Trait Hatespapal_states > 0 

    Affects Hatespapal_states -1 Chance 10

;------------------------------------------
Trigger DamnCrusaders
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and IsCrusadeTarget
          and not Religion catholic  

    Affects Hatescatholic 1 Chance 25

;------------------------------------------
Trigger DamnJihadis     
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement 
          and IsJihadTarget
          and not Religion islam

    Affects Hatesislam 1 Chance 25

;------------------------------------------
Trigger undersiege
    WhenToTest CharacterTurnEnd

    Condition IsUnderSiege
          and IsGeneral

    Affects Miserly  1  Chance  20   

;------------------------------------------
Trigger family1
    WhenToTest BrotherAdopted

    Affects Anger  1  Chance  5 
    Affects Arse  1  Chance  1 
    Affects Corrupt  1  Chance  5 
    Affects Slothful  1  Chance  4 

;------------------------------------------
Trigger family2
    WhenToTest BrotherAdopted

    Affects Girls  1  Chance  5 
    Affects Gambling  1  Chance  5 
    Affects ExpensiveTastes  1  Chance  5 
    Affects Disloyal  1  Chance  8 
    Affects Unjust  1  Chance  10 

;------------------------------------------
Trigger family3
    WhenToTest BrotherAdopted

    Affects Paranoia  1  Chance  5 
    Affects HarshRuler  1  Chance  10 

;------------------------------------------
Trigger family4
    WhenToTest CharacterMarries

    Condition Trait Girls >= 1

    Affects Prim  1  Chance  40 

;------------------------------------------
Trigger family5
    WhenToTest CharacterMarries

    Condition Trait Girls >= 2

    Affects Prim  2  Chance  30 

;------------------------------------------
Trigger family6
    WhenToTest CharacterMarries

    Condition Trait Girls >= 3

    Affects Prim  2  Chance  40 

;------------------------------------------
Trigger family7
    WhenToTest CharacterMarries

    Condition Trait Girls >= 4

    Affects Prim  5  Chance  20  

;------------------------------------------
Trigger family11
    WhenToTest CharacterMarries

    Condition Trait Drink >= 2

    Affects Sobriety  1  Chance  40 

;------------------------------------------
Trigger family12
    WhenToTest CharacterMarries

    Condition Trait Drink >= 3

    Affects Sobriety  2  Chance  30 

;------------------------------------------
Trigger family13
    WhenToTest CharacterMarries

    Condition Trait Drink >= 4

    Affects Sobriety  4  Chance  40 

;------------------------------------------
Trigger family14
    WhenToTest CharacterMarries

    Condition Trait Drink >= 5

    Affects Sobriety  8  Chance  20 

;------------------------------------------
Trigger family15
    WhenToTest CharacterMarries


    Affects Sobriety  1  Chance  5 
    Affects Prim  1  Chance  5 
    Affects Drink  1  Chance  5 
    Affects Girls  1  Chance  2 
    Affects Sane  1  Chance  10 


;*********  PRINCESS TRAITS TRIGGERS  *********
;------------------------------------------
Trigger princess_base
    WhenToTest CharacterComesOfAge

    Condition AgentType = princess

    Affects IAmPrincess  1  Chance  100 

;------------------------------------------
Trigger princessinit2
    WhenToTest CharacterComesOfAge

    Condition AgentType = princess

    Affects AgentPiety  1  Chance  100

;------------------------------------------
Trigger princess_dad_was_ugly
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ugly >= 1
          and AgentType = princess

    Affects UglyWoman  1  Chance  33 
    Affects UglyWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_ugly2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ugly >= 2
          and AgentType = princess

    Affects UglyWoman  1  Chance  33 
    Affects UglyWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_ugly3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ugly >= 3
          and AgentType = princess

    Affects UglyWoman  1  Chance  33 
    Affects UglyWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_handsome
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Handsome >= 1
          and AgentType = princess

    Affects PrettyWoman  1  Chance  33 
    Affects PrettyWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_handsome2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Handsome >= 2
          and AgentType = princess

    Affects PrettyWoman  1  Chance  33 
    Affects PrettyWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_handsome3
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Handsome >= 3
          and AgentType = princess

    Affects PrettyWoman  1  Chance  33 
    Affects PrettyWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_intelligent
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Intelligent >= 1
          and AgentType = princess

    Affects EducatedWoman  1  Chance  33 
    Affects EducatedWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_intelligent2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Intelligent >= 2
          and AgentType = princess

    Affects EducatedWoman  1  Chance  33 
    Affects VapidWoman  1  Chance  33 

;------------------------------------------
Trigger princess_dad_was_ignorant
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ignorance >= 1
          and AgentType = princess

    Affects VapidWoman  1  Chance  33 
    Affects VapidWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_ignorant2
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Ignorance >= 2
          and AgentType = princess

    Affects VapidWoman  1  Chance  33 
    Affects EducatedWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_prim
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Prim >= 1
          and AgentType = princess

    Affects FaithfulWoman  1  Chance  33 
    Affects FaithfulWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_womaniser
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Girls >= 1
          and AgentType = princess

    Affects UnchasteWoman  1  Chance  33 
    Affects UnchasteWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_perverted
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Perverted >= 1
          and AgentType = princess

    Affects UnchasteWoman  1  Chance  33 
    Affects ColdWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_rabblerouser
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Rabblerouser >= 1
          and AgentType = princess

    Affects SpiritedWoman  1  Chance  33 
    Affects SpiritedWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_xenophile
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Xenophilia >= 1
          and AgentType = princess

    Affects TolerantWoman  1  Chance  33 
    Affects BigotWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_xenophobe
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Xenophobia >= 1
          and AgentType = princess

    Affects BigotWoman  1  Chance  33 
    Affects TolerantWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_fertile
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Fertile >= 1
          and AgentType = princess

    Affects FertileWoman  1  Chance  50 
    Affects FertileWoman  1  Chance  33 

;------------------------------------------
Trigger princess_dad_was_infertile
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Infertile >= 1
          and AgentType = princess

    Affects InfertileWoman  1  Chance  33 
    Affects InfertileWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_harshruler
    WhenToTest CharacterComesOfAge

    Condition FatherTrait HarshRuler >= 1
          and AgentType = princess

    Affects PretentiousWoman  1  Chance  33 
    Affects HumbleWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_kindruler
    WhenToTest CharacterComesOfAge

    Condition FatherTrait KindRuler >= 1
          and AgentType = princess

    Affects HumbleWoman  1  Chance  33 
    Affects PretentiousWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_authoritarian
    WhenToTest CharacterComesOfAge

    Condition FatherTrait Authoritarian >= 1
          and AgentType = princess

    Affects HarshWoman  1  Chance  33 
    Affects FairWoman  1  Chance  25 

;------------------------------------------
Trigger princess_dad_was_nonauthoritarian
    WhenToTest CharacterComesOfAge

    Condition FatherTrait NonAuthoritarian >= 1
          and AgentType = princess

    Affects FairWoman  1  Chance  33 
    Affects HarshWoman  1  Chance  25

;------------------------------------------
Trigger princess_base2
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects NaturalPrincess 1 Chance 75
Affects PassionateWoman 1 Chance 50
Affects PrettyWoman 1 Chance 33
Affects BraveWoman 1 Chance 15
Affects DykeWoman 1 Chance 5

;------------------------------------------
Trigger princess_base3
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects NaturalPrincess 1 Chance 66
Affects PassionateWoman 1 Chance 33
Affects PrettyWoman 1 Chance 15
Affects BraveWoman 1 Chance 5
Affects DykeWoman 1 Chance 3

;------------------------------------------
Trigger princess_base4
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects NaturalPrincess 1 Chance 33
Affects PassionateWoman 1 Chance 15
Affects PrettyWoman 1 Chance 5
Affects BraveWoman 1 Chance 3

;------------------------------------------
Trigger princess_base5
WhenToTest CharacterComesOfAge

Condition AgentType = princess
and not Trait PrettyWoman > 0

Affects HumbleWoman 1 Chance 50
Affects UglyWoman 1 Chance 50
Affects SpiritedWoman 1 Chance 10
Affects BraveWoman 1 Chance 5

;------------------------------------------
Trigger princess_base5a
WhenToTest CharacterComesOfAge

Condition AgentType = princess
and Trait PrettyWoman > 0

Affects PretentiousWoman 1 Chance 33
Affects PretentiousWoman 1 Chance 10
Affects HumbleWoman 1 Chance 33
Affects HumbleWoman 1 Chance 10

;------------------------------------------
Trigger princess_base6
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects PretentiousWoman 1 Chance 33
Affects UglyWoman 1 Chance 15
Affects SpiritedWoman 1 Chance 15
Affects BraveWoman 1 Chance 5
Affects TimidWoman 1 Chance 5

;------------------------------------------
Trigger princess_base9
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects FaithfulWoman 1 Chance 5
Affects FaithfulWoman 1 Chance 5
Affects DesperateWoman 1 Chance 5
Affects DesperateWoman 1 Chance 5

;------------------------------------------
Trigger princess_base10
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects UnchasteWoman 1 Chance 5
Affects UnchasteWoman 1 Chance 5
Affects HarshWoman 1 Chance 5
Affects HarshWoman 1 Chance 5

;------------------------------------------
Trigger princess_base11
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects ColdWoman 1 Chance 5
Affects ColdWoman 1 Chance 5
Affects FairWoman 1 Chance 5
Affects FairWoman 1 Chance 5

;------------------------------------------
Trigger princess_base12
WhenToTest CharacterComesOfAge

Condition AgentType = princess

Affects BigotWoman 1 Chance 5
Affects TolerantWoman 1 Chance 5
Affects EducatedWoman 1 Chance 5
Affects VapidWoman 1 Chance 10

;------------------------------------------
Trigger princess_Buildings_Castle
WhenToTest CharacterComesOfAge

Condition AgentType = princess
and FactionBuildingExists >= wooden_castle

Affects BraveWoman 1 Chance 10
Affects SpiritedWoman 1 Chance 10
Affects UnchasteWoman 1 Chance 10
Affects ColdWoman 1 Chance 5
Affects FairWoman 1 Chance 5
Affects HarshWoman 1 Chance 5

;------------------------------------------
Trigger sitting_around_town_vnv_trigger2
WhenToTest CharacterTurnEnd

Condition EndedInSettlement
and Treasury > 25000
and AgentType = princess
and SettlementBuildingExists >= pleasure_palace
and RemainingMPPercentage = 100

Affects DykeWoman  1 Chance 10

;------------------------------------------
Trigger sitting_around_town_vnv_trigger3
WhenToTest CharacterTurnEnd

Condition EndedInSettlement
and AgentType = princess
and SettlementBuildingExists >= church
and RemainingMPPercentage = 100

Affects EducatedWoman 1 Chance 15

;------------------------------------------
Trigger sitting_around_town_vnv_trigger4
WhenToTest CharacterTurnEnd

Condition EndedInSettlement
and AgentType = princess
and SettlementBuildingExists >= inn
and RemainingMPPercentage = 100

Affects UnchasteWoman 1 Chance 5

;------------------------------------------
Trigger sitting_around_town_vnv_trigger5
WhenToTest CharacterTurnEnd

Condition EndedInSettlement
and AgentType = princess
and SettlementBuildingExists >= cathedral
and RemainingMPPercentage = 100

Affects FaithfulWoman 1 Chance 20 

;------------------------------------------
Trigger princess_mom_was_charming_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsCharming >= 1
and AgentType = princess

Affects PrettyWoman 1 Chance  20
Affects PassionateWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_charming_2
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsCharming >= 2
and AgentType = princess

Affects PrettyWoman 1 Chance  20
Affects PassionateWoman 1 Chance  20

;------------------------------------------

Trigger princess_mom_was_charming_3
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsCharming >= 3
and AgentType = princess

Affects PrettyWoman 1 Chance  20
Affects PassionateWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_horrid_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsHorrid >= 1
and AgentType = princess

Affects UglyWoman 1 Chance  20
Affects ColdWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_horrid_2
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsHorrid >= 2
and AgentType = princess

Affects UglyWoman 1 Chance  20
Affects ColdWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_horrid_3
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsHorrid >= 3
and AgentType = princess

Affects ColdWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_fertile_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsFertile >= 1
and AgentType = princess

Affects FertileWoman 1 Chance 25
Affects FertileWoman 1 Chance 25

;------------------------------------------
Trigger princess_mom_was_infertile_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsBarren >= 1
and AgentType = princess

Affects InfertileWoman 1 Chance 20
Affects InfertileWoman 1 Chance 20

;------------------------------------------
Trigger princess_mom_was_wise_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsWise >= 1
and AgentType = princess

Affects EducatedWoman 1 Chance  20
Affects EducatedWoman 1 Chance 25
Affects EducatedWoman 1 Chance 10

;------------------------------------------
Trigger princess_mom_was_noble_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsNoble >= 1
and AgentType = princess

Affects FairWoman 1 Chance  20
Affects HumbleWoman 1 Chance  20
Affects SpiritedWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_noble_2
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsNoble >= 2
and AgentType = princess

Affects FairWoman 1 Chance  20
Affects HumbleWoman 1 Chance  20
Affects SpiritedWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_noble_3
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsNoble >= 3
and AgentType = princess

Affects FairWoman 1 Chance  20
Affects SpiritedWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_1
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsbitch >= 1
and AgentType = princess

Affects HarshWoman 1 Chance  20
Affects PretentiousWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_2
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsbitch >= 2
and AgentType = princess

Affects HarshWoman 1 Chance  20
Affects PretentiousWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_3
WhenToTest CharacterComesOfAge

Condition FatherTrait WifeIsbitch >= 3
and AgentType = princess

Affects HarshWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_4
WhenToTest CharacterComesOfAge

Condition FatherTrait Cuckold >= 2
and AgentType = princess

Affects UnchasteWoman 1 Chance  20
Affects FaithfulWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_5
WhenToTest CharacterComesOfAge

Condition FatherTrait Cuckold >= 3
and AgentType = princess

Affects UnchasteWoman 1 Chance  20
Affects FaithfulWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_6
WhenToTest CharacterComesOfAge

Condition FatherTrait Cuckold >= 4
and AgentType = princess

Affects UnchasteWoman 1 Chance  20
Affects FaithfulWoman 1 Chance  20

;------------------------------------------
Trigger princess_mom_was_bitch_7
WhenToTest CharacterComesOfAge

Condition FatherTrait Cuckold >= 5
and AgentType = princess

Affects FaithfulWoman 1 Chance  20

;------------------------------------------
Trigger HowDareThey_a
    WhenToTest SufferAssassinationAttempt

    Condition AgentType = princess

    Affects TimidWoman  1  Chance  33 

;------------------------------------------
Trigger HowDareThey_b
    WhenToTest ExecutesAnAssassinOnAMission

    Condition AgentType = princess

    Affects BraveWoman  1  Chance  75 

;------------------------------------------
Trigger agents27
    WhenToTest DiplomacyMission

    Condition MissionSucceeded

    Affects GoodDiplomat  1  Chance  100 
    Affects GoodPrincess  1  Chance  75

;*********  ADMIRAL TRAITS TRIGGERS  *********
;------------------------------------------
Trigger admiral1
    WhenToTest PostBattle

    Condition AgentType = admiral
          and WonBattle
          and BattleOdds < 2.25

    Affects Sailor  1  Chance  100 

;------------------------------------------
Trigger admiral2
    WhenToTest PostBattle

    Condition AgentType = admiral
          and not WonBattle
          and BattleOdds > 1.5

    Affects Landlubber  1  Chance  100 

;------------------------------------------
Trigger admiralinit1
    WhenToTest AgentCreated

    Condition AgentType = admiral
          and FactionType slave

    Affects FamousPirate  1  Chance  33
    Affects FamousPirate  1  Chance  33
    Affects FamousPirate  1  Chance  33

;*********  PRIEST TRAITS TRIGGERS  *********
;------------------------------------------
Trigger priest_patriach_byzantium
    WhenToTest CharacterTurnEnd

    Condition AgentType = priest
	and HasAncType HeadofChurch

    Affects PatriachLevel  1  Chance  100 

;------------------------------------------
Trigger Priest_Natural
    WhenToTest AgentCreated

    Condition AgentType = priest

    Affects NaturalPriestSkill  1  Chance  100 

;------------------------------------------
Trigger Priest_Natural2_Player
    WhenToTest AgentCreated

    Condition AgentType = priest
	and FactionIsLocal
        and Trait NaturalPriestSkill = 1

    Affects NaturalPriestSkill  1  Chance  33 

;------------------------------------------
Trigger Priest_Natural2_Ai
    WhenToTest AgentCreated

    Condition AgentType = priest
	and not FactionIsLocal
        and Trait NaturalPriestSkill = 1

    Affects NaturalPriestSkill  1  Chance  100 

;------------------------------------------
Trigger Priest_Natural3
    WhenToTest AgentCreated

    Condition AgentType = priest
	and Trait NaturalPriestSkill = 2

    Affects NaturalPriestSkill  1  Chance  20 

;------------------------------------------
Trigger Priest_Natural3_Hard
    WhenToTest AgentCreated

    Condition AgentType = priest
	and not FactionIsLocal
	and I_EventCounter DifficultyLevel = 3
        and Trait NaturalPriestSkill = 2

    Affects NaturalPriestSkill  1  Chance  100 

;------------------------------------------
Trigger priestinit4
    WhenToTest AgentCreated

    Condition AgentType = priest
          and SettlementBuildingExists >= cathedral
          and Trait PriestLevel = 0

    Affects PriestLevel  1  Chance  100 

;------------------------------------------
Trigger priestinit5
    WhenToTest AgentCreated

    Condition AgentType = priest
          and not CultureType middle_eastern
          and not FactionReligion pagan

    Affects SecretlyFemale  1  Chance  1
;------------------------------------------
Trigger priest_faith
    WhenToTest AgentCreated

    Condition AgentType = priest

    Affects StrongFaith  1  Chance  8

;------------------------------------------
Trigger agents36
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and PopulationOwnReligion < 60
          and PopulationHeretic >= 20
          and ReligionShift <= 8
          and TimeInRegion > 5

    Affects WaveringFaith  1  Chance  20 

;------------------------------------------
Trigger agents37_conversion1
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and ReligionShift >= 8
          and TimeInRegion < 3
          and Trait StrongFaith < 1

    Affects StrongFaith  1  Chance  85 

;------------------------------------------
Trigger agents37_conversion2
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and ReligionShift >= 10
          and TimeInRegion < 5
          and Trait StrongFaith = 1

    Affects StrongFaith  1  Chance  33 

;------------------------------------------
Trigger agents37_conversion3
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and ReligionShift >= 10
          and TimeInRegion < 5
          and Trait StrongFaith > 1

    Affects StrongFaith  1  Chance  25 

;------------------------------------------
Trigger agents38
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and PopulationOwnReligion <= 40
          and TimeInRegion > 2

    Affects OpenMinded  1  Chance  20 

;------------------------------------------
Trigger agents39
    WhenToTest CharacterNearHeretic

    Condition AgentType = priest

    Affects OpenMinded  1  Chance  20

;------------------------------------------
Trigger agents40
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and ReligionShift < 10
          and PopulationOwnReligion > 85
          and TimeInRegion = 3

    Affects Dogmatic  1  Chance  33 

;------------------------------------------
Trigger agents41
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and AgentType = priest
          and SettlementBuildingExists >= cathedral

    Affects Dogmatic  1  Chance  40 

;------------------------------------------
Trigger agents41a
    WhenToTest SufferAssassinationAttempt

    Condition AgentType = priest

    Affects Doomsayer  1  Chance  85 

;------------------------------------------
Trigger agents41b
    WhenToTest ExecutesAnAssassinOnAMission

    Condition AgentType = priest

    Affects DivineProtection  1  Chance  85 

;------------------------------------------
Trigger agents42_normal_denouncement
    WhenToTest DenouncementMission

    Condition MissionSucceeded
        and not Trait BadDenouncer > 0
	and FactionIsLocal

    Affects GoodDenouncer  1  Chance  85 

;------------------------------------------
Trigger agents42_normal_denouncement_failure
    WhenToTest DenouncementMission

    Condition not MissionSucceeded
          and not Trait GoodDenouncer > 0
	  and FactionIsLocal

    Affects BadDenouncer  1  Chance  10

;------------------------------------------
Trigger agents42_inquisitor_big_failure
    WhenToTest DenouncementMission

    Condition not MissionSucceeded
          and AgentType = inquisitor
          and Trait BadDenouncer >= 2
	  and FactionIsLocal

    Affects InquisitorFailure  1  Chance  100

;------------------------------------------
Trigger agents43a
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and TimeInRegion > 4
          and TimeSinceHeresy < 5 >= 10
          and PopulationHeretic < 5
          and ReligionShift > 10

    Affects Purifier  1  Chance  85 

;------------------------------------------
Trigger agents43b
    WhenToTest CharacterTurnEnd

    Condition not AtSea
          and AgentType = priest
          and TimeInRegion > 4
          and TimeSinceReligion > 95 >= 10
          and PopulationOwnReligion > 95
          and ReligionShift > 10

    Affects Missionary  1  Chance  85 

;------------------------------------------
Trigger agents43c
    WhenToTest CharacterTurnEnd

    Condition AgentType = priest
          and not CharacterReligion catholic
          and Attribute Piety > 5
          and Trait HeresyImmunityNonCatholic = 0

    Affects HeresyImmunityNonCatholic  1  Chance  85 

;------------------------------------------
Trigger priestinit10
    WhenToTest AgentCreated

    Condition AgentType = priest
          and SettlementBuildingExists >= theologians_guild

    Affects TheologiansGuildTrained  1  Chance  100 

;------------------------------------------
Trigger priestinit11
    WhenToTest AgentCreated

    Condition AgentType = priest
          and FactionBuildingExists >= m_theologians_guild

    Affects TheologiansGuildMember  2  Chance  100 

;------------------------------------------
Trigger priestinit12
    WhenToTest AgentCreated

    Condition AgentType = priest
          and FactionBuildingExists = gm_theologians_guild

    Affects TheologiansGuildMember  3  Chance  100

;------------------------------------------
Trigger priestinit13b
    WhenToTest AgentCreated

    Condition AgentType = priest
    and SettlementBuildingExists >= cathedral_o
    and Trait PriestLevel = 0

    Affects PriestLevel 1 Chance 100

;------------------------------------------
Trigger cardinalinit1
    WhenToTest CardinalPromoted

    Condition Trait PriestLevel = 1

    Affects PriestLevel  1  Chance  100 

;------------------------------------------
Trigger cardinalinit2
    WhenToTest CardinalPromoted

    Condition Trait PriestLevel = 0

    Affects PriestLevel  2  Chance  100 

;------------------------------------------
Trigger cardinalinit3
    WhenToTest CardinalPromoted

    Affects Warmonger  1  Chance  33 
    Affects Peaceful  1  Chance  33 
    Affects Corrupt  1  Chance  33 
    Affects Righteous  1  Chance  33 

;------------------------------------------
Trigger cardinalinit4
    WhenToTest CardinalPromoted

    Condition Trait Warmonger >= 1

    Affects Warmonger  1  Chance  33 

;------------------------------------------
Trigger cardinalinit5
    WhenToTest CardinalPromoted

    Condition Trait Warmonger >= 2

    Affects Warmonger  1  Chance  33 

;------------------------------------------
Trigger cardinalinit6
    WhenToTest CardinalPromoted

    Condition Trait Peaceful >= 1

    Affects Peaceful  1  Chance  33 

;------------------------------------------
Trigger cardinalinit7
    WhenToTest CardinalPromoted

    Condition Trait Peaceful >= 2

    Affects Peaceful  1  Chance  33 

;------------------------------------------
Trigger cardinalinit8
    WhenToTest CardinalPromoted

    Condition Trait Corrupt >= 1

    Affects Corrupt  1  Chance  33 

;------------------------------------------
Trigger cardinalinit9
    WhenToTest CardinalPromoted

    Condition Trait Corrupt >= 2

    Affects Corrupt  1  Chance  33 

;------------------------------------------
Trigger cardinalinit10
    WhenToTest CardinalPromoted

    Condition Trait Righteous >= 1

    Affects Righteous  1  Chance  33 

;------------------------------------------
Trigger cardinalinit11
    WhenToTest CardinalPromoted

    Condition Trait Righteous >= 2

    Affects Righteous  1  Chance  33

;*********  INQUISITOR TRAITS TRIGGERS  *********
;------------------------------------------
Trigger inquisitorinit1
    WhenToTest AgentCreated

    Condition AgentType = inquisitor

    Affects NaturalInquisitorSkill  1  Chance  100 

;------------------------------------------
Trigger inquisitorinit2
    WhenToTest AgentCreated

    Condition AgentType = inquisitor
          and Trait NaturalInquisitorSkill = 1

    Affects NaturalInquisitorSkill  1  Chance  33 

;------------------------------------------
Trigger inquisitorinit3
    WhenToTest AgentCreated

    Condition AgentType = inquisitor
          and Trait NaturalInquisitorSkill >= 2

    Affects NaturalInquisitorSkill  1  Chance  22 

;------------------------------------------
Trigger inquisitorinit4
    WhenToTest AgentCreated

    Condition AgentType = inquisitor
          and FactionLeaderAttribute Purity > 0

    Affects FairProsecutor  1  Chance  100 

;------------------------------------------
Trigger inquisitorinit5
    WhenToTest AgentCreated

    Condition AgentType = inquisitor
          and FactionLeaderAttribute Violence > 0

    Affects FairProsecutor  1  Chance  100 

;------------------------------------------
Trigger inquisitorinit6
    WhenToTest AgentCreated

    Condition AgentType = inquisitor
          and FactionLeaderAttribute Purity < 0

    Affects UnfairProsecutor  1  Chance  100 

;------------------------------------------
Trigger inquisitorinit7
    WhenToTest AgentCreated

    Condition AgentType = inquisitor
          and FactionLeaderAttribute Violence < 0

    Affects UnfairProsecutor  1  Chance  100 

;------------------------------------------
Trigger agents50
    WhenToTest ExecutesAnAssassinOnAMission

    Condition AgentType = inquisitor

    Affects GrowingConviction  1  Chance  33 

;------------------------------------------
Trigger agents48
    WhenToTest SufferAssassinationAttempt

    Condition AgentType = inquisitor

    Affects WaningConviction  1  Chance  33

;------------------------------------------
Trigger agents51a
    WhenToTest CharacterTurnEnd

    Condition AgentType = inquisitor

    Affects GrowingConviction  1  Chance  10 

;------------------------------------------
Trigger agents51b
    WhenToTest CharacterTurnEnd

    Condition AgentType = inquisitor

    Affects WaningConviction  1  Chance  10 

;*********  MERCHANTILE TRIGGERS  *********
;------------------------------------------
Trigger MerchantCreated
    WhenToTest AgentCreated

    Condition AgentType = merchant

    Affects NaturalMerchantSkill  1  Chance  100 

;------------------------------------------
Trigger MerchantNatSkill2
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and Trait NaturalMerchantSkill = 1

    Affects NaturalMerchantSkill  1  Chance  33 

;------------------------------------------
Trigger MerchantNatSkill3
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and Trait NaturalMerchantSkill >= 2

    Affects NaturalMerchantSkill  1  Chance  33 

;------------------------------------------
Trigger Merchant_Venice
    WhenToTest AgentCreated

    Condition AgentType = merchant
    	and FactionType venice
        and Trait NaturalMerchantSkill = 1

    Affects NaturalMerchantSkill  1  Chance  33 

;------------------------------------------
Trigger Merchant_Genoa
    WhenToTest AgentCreated

    Condition AgentType = merchant
    	and FactionType milan
        and Trait NaturalMerchantSkill = 1

    Affects NaturalMerchantSkill  1  Chance  33 

;------------------------------------------
Trigger Merchant_BuildUnLawful1
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and not SettlementBuildingExists >= town_hall

    Affects ShadyDealer  1  Chance  33 

;------------------------------------------
Trigger Merchant_BuildUnLawful2
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and SettlementBuildingExists >= thieves_guild

    Affects ShadyDealer  1  Chance  33 

;------------------------------------------
Trigger Merchant_UnLawful_Increase
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and Trait ShadyDealer = 1

    Affects ShadyDealer  2  Chance  33 

;------------------------------------------
Trigger Merchant_BuildLawful1
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and SettlementBuildingExists >= town_hall

    Affects LegalDealer  1  Chance  33 

;------------------------------------------
Trigger Merchant_BuildLawful2
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and SettlementBuildingExists >= assassins_guild

    Affects LegalDealer  1  Chance  33 

;------------------------------------------
Trigger Merchant_Lawful_Increase
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and Trait LegalDealer = 1

    Affects LegalDealer  1  Chance  33 

;------------------------------------------
Trigger Merchant_BuildMF1
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and SettlementBuildingExists >= merchants_quarter

    Affects Merchantfamily  1  Chance  50

;------------------------------------------
Trigger Merchant_BuildMF2
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and SettlementBuildingExists >= warehouse

    Affects Merchantfamily  1  Chance  25

;------------------------------------------
Trigger Merchant_Religion1
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and SettlementBuildingExists >= cathedral
          and PopulationOwnReligion > 80

    Affects ReligiousMerchant  1  Chance  40

;------------------------------------------
Trigger Merchant_Religion_Increase
    WhenToTest AgentCreated

    Condition AgentType = merchant
          and Trait ReligiousMerchant >= 1

    Affects ReligiousMerchant  2  Chance  45

;------------------------------------------
Trigger Merchant_BuildGuild1
    WhenToTest AgentCreated

    Condition AgentType = merchant
	and SettlementBuildingExists = merchants_guild

    Affects MerchantsGuildMember  1  Chance  100 

;------------------------------------------
Trigger Merchant_BuildGuild2
    WhenToTest AgentCreated

    Condition AgentType = merchant
	and SettlementBuildingExists = m_merchants_guild

    Affects MerchantsGuildMember  2  Chance  100 

;------------------------------------------
Trigger Merchant_BuildGuild3
    WhenToTest AgentCreated

    Condition AgentType = merchant
	and SettlementBuildingExists = gm_merchants_guild

    Affects MerchantsGuildMember  3  Chance  100 

;------------------------------------------
Trigger Merchant_BuildGuild_Faction
    WhenToTest AgentCreated

    Condition AgentType = merchant
        and not SettlementBuildingExists >= merchants_guild
	and FactionBuildingExists = gm_merchants_guild

    Affects MerchantsGuildMember  1  Chance  100 

;------------------------------------------
Trigger Merchant_CityTrade
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
    and EndedInSettlement
    and SettlementBuildingExists >= m_merchants_guild

    Affects GoodMerchant  1  Chance  10 

;------------------------------------------
Trigger Merchant_piety
    WhenToTest AgentCreated

    Condition AgentType = merchant

    Affects AgentPiety  1  Chance  100

;------------------------------------------
Trigger Merchant_Acquition_Success
    WhenToTest AcquisitionMission

    Condition MissionSucceeded

    Affects GoodMerchant  1  Chance  85 
    Affects MerchantEnemies  1  Chance  25 

;------------------------------------------
Trigger Merchant_Acquition_Fail
    WhenToTest AcquisitionMission

    Condition not MissionSucceeded
	and FactionIsLocal

    Affects BadMerchant  1  Chance  33 

;------------------------------------------
Trigger Merchant_Acquition_Attempt
    WhenToTest SufferAcquisitionAttempt

    Affects SecureMerchant  1  Chance  60

;------------------------------------------
Trigger Merchant_Assassination_Attempt
    WhenToTest SufferAssassinationAttempt

    Condition AgentType = merchant

    Affects SecurityMerchant  1  Chance  45

;------------------------------------------
;problem with number of resources in SS 6.1
Trigger Merchant_Monopoly
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
          and TradingMonopoly

    Affects Monopolist  1  Chance  85 

;------------------------------------------
Trigger agents33
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant

    Affects Monopolist  1  Chance  5 

;------------------------------------------
Trigger agents33a
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant

    Affects GoodMerchant  1  Chance  5
 
;------------------------------------------

Trigger Merchant_Trading1
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
	and OnResource
        and DistanceCapital >= 75

    Affects ServesSelfMerchant  1  Chance  3 

;------------------------------------------
Trigger Merchant_Trading2
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
          and OnResource
          and DistanceCapital >= 60

    Affects WorldlyMerchant  1  Chance  20

;------------------------------------------
Trigger Merchant_Trading3
    WhenToTest CharacterTurnEnd

    Condition CharacterNumTurnsIdle = 10
	and AgentType = merchant
	and NoActionThisTurn
	and TradingExotic
	and Trait MerchantExoticPure = 0
	and Trait MerchantExoticCorrupt = 0

    Affects MerchantExoticPure  1  Chance  100
    Affects MerchantExoticCorrupt  2  Chance  50

;------------------------------------------
Trigger Merchant_Trading4
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
	and OnResource

    Affects GoodMerchant  1  Chance  5
 

;*********  DIPLOMAT TRAITS TRIGGERS  *********
;------------------------------------------
Trigger diplomatinit1
    WhenToTest AgentCreated

    Condition AgentType = diplomat

    Affects NaturalDiplomatSkill  1  Chance  100 

;------------------------------------------
Trigger diplomatinit2
    WhenToTest AgentCreated

    Condition AgentType = diplomat
          and Trait NaturalDiplomatSkill = 1

    Affects NaturalDiplomatSkill  1  Chance  33 

;------------------------------------------
Trigger diplomatinit3
    WhenToTest AgentCreated

    Condition AgentType = diplomat
          and Trait NaturalDiplomatSkill = 2

    Affects NaturalDiplomatSkill  1  Chance  45

;------------------------------------------
Trigger diplomatinit4
    WhenToTest AgentCreated

    Condition AgentType = diplomat

    Affects Talkative  1  Chance  33
    Affects Secretive  1  Chance  33

;------------------------------------------
Trigger diplomat_libary
    WhenToTest AgentCreated

    Condition AgentType = diplomat
          and SettlementBuildingExists >= library

    Affects Multilingual  1  Chance  33 

;------------------------------------------
Trigger diplomatinit5
    WhenToTest AgentCreated

    Condition AgentType = diplomat
          and DistanceCapital >= 50

    Affects Multilingual  1  Chance  33 

;------------------------------------------
Trigger diplomatinit6
    WhenToTest AgentCreated

    Condition Trait Multilingual >= 1

    Affects Multilingual  1  Chance  33 

;------------------------------------------
Trigger diplomatinit7
    WhenToTest AgentCreated

    Condition not AtSea
          and AgentType = diplomat
          and PopulationOwnReligion >= 80

    Affects ReligiousIntolerance  1  Chance  33 

;------------------------------------------
Trigger diplomatinit8
    WhenToTest AgentCreated

    Condition Trait ReligiousIntolerance >= 1

    Affects ReligiousIntolerance  1  Chance  25 

;------------------------------------------
Trigger diplomatinit9
    WhenToTest AgentCreated

    Condition not AtSea
          and AgentType = diplomat
          and PopulationOwnReligion <= 70

    Affects ReligiousTolerance  1  Chance  33 

;------------------------------------------
Trigger diplomatinit10
    WhenToTest AgentCreated

    Condition Trait ReligiousTolerance >= 1

    Affects ReligiousTolerance  1  Chance  25 

;------------------------------------------
Trigger diplomatinit11
    WhenToTest AgentCreated

    Condition AgentType = diplomat

    Affects AgentPiety  1  Chance  100 

;------------------------------------------
Trigger agents18
    WhenToTest BriberyMission

    Condition MissionSucceeded

    Affects GoodDiplomat  2  Chance  85 
    Affects SmoothTalker  1  Chance  85 

;------------------------------------------
Trigger agents19
    WhenToTest BriberyMission

    Condition not MissionSucceeded

    Affects BadDiplomat  1  Chance  50

;------------------------------------------
Trigger agents28
    WhenToTest DiplomacyMission

    Condition not MissionSucceeded

    Affects BadDiplomat  1  Chance  25

;------------------------------------------
Trigger agents45
    WhenToTest SufferAssassinationAttempt

    Condition AgentType = diplomat

    Affects CowardDiplomat  1  Chance  50

;------------------------------------------
Trigger agents46
    WhenToTest ExecutesAnAssassinOnAMission

    Condition AgentType = diplomat

    Affects BraveDiplomat  1  Chance  50

;*********  SPY TRAITS TRIGGERS  *********
;------------------------------------------
Trigger spyinit7
    WhenToTest AgentCreated

    Condition AgentType = spy

    Affects AgentPiety  1  Chance  100

;------------------------------------------
Trigger agents1
    WhenToTest SpyMission

    Condition MissionSuccessLevel = not_successful

    Affects BadSpy  1  Chance  35 

;------------------------------------------
Trigger agents2
    WhenToTest SpyMission

    Condition MissionSucceeded

    Affects GoodSpy  1  Chance  75 

;------------------------------------------
Trigger agents4
    WhenToTest SpyMission

    Condition MissionSuccessLevel = highly_successful

    Affects GoodConspirator  1  Chance  33

;------------------------------------------
Trigger spyinit1
    WhenToTest AgentCreated

    Condition AgentType = spy

    Affects NaturalSpySkill  1  Chance  100 
    Affects GoodConspirator  1  Chance  20 

;------------------------------------------
Trigger spyinit2
    WhenToTest AgentCreated

    Condition AgentType = spy
          and Trait NaturalSpySkill = 1

    Affects NaturalSpySkill  1  Chance  33 

;------------------------------------------
Trigger spyinit3
    WhenToTest AgentCreated

    Condition AgentType = spy
          and Trait NaturalSpySkill = 2

    Affects NaturalSpySkill  1  Chance  20 

;------------------------------------------
Trigger spyinit4
    WhenToTest AgentCreated

    Condition AgentType = spy
          and SettlementBuildingExists >= thieves_guild

    Affects ThievesGuildTrained  1  Chance  100 

;------------------------------------------
Trigger spyinit5
    WhenToTest AgentCreated

    Condition AgentType = spy
          and FactionBuildingExists = m_thieves_guild

    Affects ThievesGuildMember  1  Chance  100 

;------------------------------------------
Trigger spyinit6
    WhenToTest AgentCreated

    Condition AgentType = spy
          and FactionBuildingExists = gm_thieves_guild

    Affects ThievesGuildMember  3  Chance  100 

;*********  ASSASSIN TRAITs TRIGGERS  ********* 
;------------------------------------------
Trigger agents6
    WhenToTest AssassinationMission

    Condition MissionSucceeded

    Affects GoodAssassin  1  Chance  85 

;------------------------------------------
Trigger agents7
    WhenToTest AssassinationMission

    Condition not MissionSucceeded

    Affects BadAssassin  1  Chance  25

;------------------------------------------
Trigger agents14
    WhenToTest SabotageMission

    Condition MissionSucceeded

    Affects GoodConspirator  1  Chance  85

;------------------------------------------
Trigger agents13
    WhenToTest SabotageMission

    Condition not MissionSucceeded

    Affects BadConspirator  1  Chance  33

;------------------------------------------
Trigger agents26
    WhenToTest Insurrection


    Affects GoodConspirator  1  Chance  20

;------------------------------------------
Trigger assassininit1
    WhenToTest AgentCreated

    Condition AgentType = assassin

    Affects NaturalAssassinSkill  1  Chance  100 

;------------------------------------------
Trigger assassininit2
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and Trait NaturalAssassinSkill = 1

    Affects NaturalAssassinSkill  1  Chance  33 

;------------------------------------------
Trigger assassininit3
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and Trait NaturalAssassinSkill >= 2

    Affects NaturalAssassinSkill  1  Chance  33 

;------------------------------------------
Trigger assassininit4
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and SettlementBuildingExists >= assassins_guild

    Affects AssassinsGuildTrained  1  Chance  100 

;------------------------------------------
Trigger assassininit5
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and FactionBuildingExists >= m_assassins_guild

    Affects AssassinsGuildMember  2  Chance  100 

;------------------------------------------
Trigger assassininit6
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and FactionBuildingExists = gm_assassins_guild

    Affects AssassinsGuildMember  3  Chance  100 

;------------------------------------------
Trigger assassininit7
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and FactionBuildingExists >= eastern_assassins_guild

    Affects AssassinsGuildTrained  1  Chance  100 

;------------------------------------------
Trigger assassininit8
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and FactionBuildingExists >= m_eastern_assassins_guild

    Affects HashashinsGuildMember  2  Chance  100 

;------------------------------------------
Trigger assassininit9
    WhenToTest AgentCreated

    Condition AgentType = assassin
          and FactionBuildingExists = gm_eastern_assassins_guild

    Affects HashashinsGuildMember  3  Chance  100 

;------------------------------------------
Trigger assassininit10
    WhenToTest AgentCreated

    Condition AgentType = assassin

    Affects AgentPiety  1  Chance  100

;*********  HERETIC TRAITS TRIGGERS  *********
;------------------------------------------
Trigger hereticinit1_denouncerclear
    WhenToTest PriestBecomesHeretic

    Condition Trait GoodDenouncer > 0

    Affects GoodDenouncer -200  Chance  100 

;------------------------------------------
Trigger hereticinit1_denouncerclear1
    WhenToTest PriestBecomesHeretic

    Condition Trait StrongFaith > 0

    Affects StrongFaith -100  Chance  100 

;------------------------------------------
Trigger hereticinit1_purifierclear
    WhenToTest PriestBecomesHeretic

    Condition Trait Purifier > 0

    Affects Purifier -20  Chance  100 

;------------------------------------------
Trigger hereticinit1a
    WhenToTest PriestBecomesHeretic

    Condition Attribute Piety < 1

    Affects NaturalHereticSkill  1  Chance  100 

;------------------------------------------
Trigger hereticinit2
    WhenToTest PriestBecomesHeretic

    Condition Trait NaturalHereticSkill >= 1

    Affects NaturalHereticSkill  1  Chance  33 

;------------------------------------------
Trigger hereticinit3
    WhenToTest PriestBecomesHeretic

    Condition Trait NaturalHereticSkill >= 2

    Affects NaturalHereticSkill  1  Chance  10 

;------------------------------------------
Trigger hereticinit7
    WhenToTest AgentCreated

    Condition AgentType = heretic

    Affects NaturalHereticSkill  1  Chance  75 

;------------------------------------------
Trigger hereticinit8
    WhenToTest AgentCreated

    Condition Trait NaturalHereticSkill >= 1

    Affects NaturalHereticSkill  1  Chance  25 

;------------------------------------------
Trigger hereticinit9
    WhenToTest AgentCreated

    Condition Trait NaturalHereticSkill >= 2

    Affects NaturalHereticSkill  1  Chance  10 

;------------------------------------------
Trigger agents47
    WhenToTest SufferAssassinationAttempt

    Condition AgentType = heretic

    Affects WaningConviction  1  Chance  33 

;------------------------------------------
Trigger agents49
    WhenToTest ExecutesAnAssassinOnAMission

    Condition AgentType = heretic

    Affects GrowingConviction  1  Chance  33

;*********  WITCH TRAITS TRIGGERS  *********
;------------------------------------------
Trigger witchinit2
    WhenToTest AgentCreated

    Condition AgentType = witch
          and Trait NaturalWitchSkill = 1

    Affects NaturalWitchSkill  1  Chance  100 

;------------------------------------------
Trigger witchinit3
    WhenToTest AgentCreated

    Condition AgentType = witch
          and Trait NaturalWitchSkill >= 2

    Affects NaturalWitchSkill  1  Chance  33 

;------------------------------------------
Trigger witchinit4
    WhenToTest AgentCreated

    Condition AgentType = witch
          and Trait NaturalWitchSkill >= 3

    Affects NaturalWitchSkill  1  Chance  33 

;------------------------------------------
Trigger witchinit5
    WhenToTest AgentCreated

    Condition AgentType = witch
          and Trait NaturalWitchSkill >= 4

    Affects NaturalWitchSkill  1  Chance  33 

;*********  SELFPERPETUATING TRIGGERS  ********* 
;------------------------------------------
Trigger selfperpetuating1
    WhenToTest CharacterTurnEnd

    Condition Trait Aesthetic >= 1

    Affects Aesthetic  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating2
    WhenToTest CharacterTurnEnd

    Condition Trait Anger >= 1

    Affects Anger  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating4
    WhenToTest CharacterTurnEnd

    Condition Trait Arse >= 1

    Affects Arse  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating5
    WhenToTest CharacterTurnEnd

    Condition Trait Austere >= 1

    Affects Austere  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating6
    WhenToTest CharacterTurnEnd

    Condition Trait Authoritarian >= 1

    Affects Authoritarian  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating10
    WhenToTest CharacterTurnEnd

    Condition Trait BoringSpeaker >= 1

    Affects BoringSpeaker  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating11
    WhenToTest CharacterTurnEnd

    Condition Trait Cheapskate >= 1

    Affects Cheapskate  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating12
    WhenToTest CharacterTurnEnd

    Condition Trait Deranged > 1

    Affects Deranged  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating13
    WhenToTest CharacterTurnEnd

    Condition Trait Drink >= 1

    Affects Drink  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating14
    WhenToTest CharacterTurnEnd

    Condition Trait Energetic >= 1

    Affects Energetic  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating15
    WhenToTest CharacterTurnEnd

    Condition Trait Epicurean >= 1

    Affects Epicurean  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating16
    WhenToTest CharacterTurnEnd

    Condition Trait ExpensiveTastes >= 1

    Affects ExpensiveTastes  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating17
    WhenToTest CharacterTurnEnd

    Condition Trait Feck >= 1

    Affects Feck  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating18
    WhenToTest CharacterTurnEnd

    Condition Trait Gambling >= 1

    Affects Gambling  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating19
    WhenToTest CharacterTurnEnd

    Condition Trait Generous >= 1

    Affects Generous  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating20
    WhenToTest CharacterTurnEnd

    Condition Trait Girls >= 1

    Affects Girls  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating21
    WhenToTest CharacterTurnEnd

    Condition Trait Hypochondriac >= 1

    Affects Hypochondriac  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating22
    WhenToTest CharacterTurnEnd

    Condition Trait Ignorance >= 1

    Affects Ignorance  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating24
    WhenToTest CharacterTurnEnd

    Condition Trait Lewd >= 1

    Affects Lewd  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating25
    WhenToTest CharacterTurnEnd

    Condition Trait Liar >= 1

    Affects Liar  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating26
    WhenToTest CharacterTurnEnd

    Condition Trait Miserly >= 1

    Affects Miserly  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating27
    WhenToTest CharacterTurnEnd

    Condition Trait Paranoia >= 1

    Affects Paranoia  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating28
    WhenToTest CharacterTurnEnd

    Condition Trait Perverted >= 1

    Affects Perverted  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating31
    WhenToTest CharacterTurnEnd

    Condition Trait Secretive >= 1

    Affects Secretive  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating32
    WhenToTest CharacterTurnEnd

    Condition Trait Slothful >= 1

    Affects Slothful  1  Chance  4 
    Affects LaxPersonalSecurity  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating33
    WhenToTest CharacterTurnEnd

    Condition Trait Sobriety >= 1

    Affects Sobriety  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating34
    WhenToTest CharacterTurnEnd

    Condition Trait Stoic >= 1

    Affects Stoic  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating35
    WhenToTest CharacterTurnEnd

    Condition Trait Superstitious >= 1

    Affects Superstitious  1  Chance  1 

;------------------------------------------
Trigger selfperpetuating36
    WhenToTest CharacterTurnEnd

    Condition Trait Talkative >= 1

    Affects Talkative  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating37
    WhenToTest CharacterTurnEnd

    Condition Trait TouchedByTheGods >= 1

    Affects TouchedByTheGods  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating38
    WhenToTest CharacterTurnEnd

    Condition Trait Trusting >= 1

    Affects Trusting  1  Chance  4 
    Affects LaxPersonalSecurity  1  Chance  4 
    Affects KindRuler  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating39
    WhenToTest CharacterTurnEnd

    Condition Trait Xenophilia >= 1

    Affects Xenophilia  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating40
    WhenToTest CharacterTurnEnd

    Condition Trait Xenophobia >= 1

    Affects Xenophobia  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating41
    WhenToTest CharacterTurnEnd

    Condition Trait Gregarious >= 1

    Affects Gregarious  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating41a
    WhenToTest CharacterTurnEnd

    Condition Trait Introvert >= 1

    Affects Introvert  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating44
    WhenToTest CharacterTurnEnd

    Condition Trait NonAuthoritarian >= 1

    Affects NonAuthoritarian  1  Chance  4 
    Affects KindRuler  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating45
    WhenToTest CharacterTurnEnd

    Condition Trait Prim >= 1

    Affects Prim  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating46
    WhenToTest CharacterTurnEnd

    Condition Trait Unjust >= 1

    Affects Unjust  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating47
    WhenToTest CharacterTurnEnd

    Condition Trait HarshRuler >= 1

    Affects HarshRuler  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating48
    WhenToTest CharacterTurnEnd

    Condition Trait Corrupt >= 1

    Affects Corrupt  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating49
    WhenToTest CharacterTurnEnd

    Condition Trait ReligiousIntolerance >= 1

    Affects ReligiousIntolerance  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating50
    WhenToTest CharacterTurnEnd

    Condition Trait ReligiousTolerance >= 1

    Affects ReligiousTolerance  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating51
    WhenToTest CharacterTurnEnd

    Condition Trait StrickenSerious >= 1

    Affects StrickenSerious  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating52
    WhenToTest CharacterTurnEnd

    Condition Trait BraveWoman  >= 1

    Affects BraveWoman  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating53
    WhenToTest CharacterTurnEnd

    Condition Trait TimidWoman >= 1

    Affects TimidWoman  1  Chance  4 

;------------------------------------------
Trigger selfperpetuating54
    WhenToTest CharacterTurnEnd

    Condition Trait PassionateWoman >= 1

    Affects PassionateWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating55
    WhenToTest CharacterTurnEnd

    Condition Trait ColdWoman >= 1

    Affects ColdWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating56
    WhenToTest CharacterTurnEnd

    Condition Trait BigotWoman >= 1

    Affects BigotWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating57
    WhenToTest CharacterTurnEnd

    Condition Trait TolerantWoman >= 1

    Affects TolerantWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating58
    WhenToTest CharacterTurnEnd

    Condition Trait HarshWoman >= 1

    Affects HarshWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating59
    WhenToTest CharacterTurnEnd

    Condition Trait FairWoman >= 1

    Affects FairWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating60
    WhenToTest CharacterTurnEnd

    Condition Trait DesperateWoman >= 1

    Affects DesperateWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating61
    WhenToTest CharacterTurnEnd

    Condition Trait SpiritedWoman >= 1

    Affects SpiritedWoman 1  Chance  4 


;------------------------------------------
Trigger selfperpetuating62
    WhenToTest CharacterTurnEnd

    Condition Trait FaithfulWoman >= 1

    Affects FaithfulWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating63
    WhenToTest CharacterTurnEnd

    Condition Trait UnchasteWoman >= 1

    Affects UnchasteWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating64
    WhenToTest CharacterTurnEnd

    Condition Trait EducatedWoman >= 1

    Affects EducatedWoman 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating65
    WhenToTest CharacterTurnEnd

    Condition Trait Humane >= 1

    Affects Humane 1  Chance  3

;------------------------------------------
Trigger selfperpetuating66
    WhenToTest CharacterTurnEnd

    Condition Trait Hardened >= 1

    Affects Hardened 1  Chance  3

;------------------------------------------
Trigger selfperpetuating67
    WhenToTest CharacterTurnEnd

    Condition Trait BadDisciplinarian >= 1

    Affects BadDisciplinarian 1  Chance  4

;------------------------------------------
Trigger selfperpetuating68
    WhenToTest CharacterTurnEnd

    Condition Trait Disciplinarian >= 1

    Affects Disciplinarian 1  Chance  4 

;------------------------------------------
Trigger selfperpetuating69
    WhenToTest CharacterTurnEnd

    Condition Trait PublicAtheism >= 1
          and PopulationOwnReligion < 33

    Affects PublicAtheism  1  Chance  4

;------------------------------------------
Trigger random_AI_birth1
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
          and IsFactionAIControlled

    Affects GoodCommander  1  Chance  50 

;============== Interactive Events ======================

;-------- AI Bad Traits Remover -----------
;------------------------------------------
Trigger ai_bad_traits_anger
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Anger > 1

    Affects Anger -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_arse
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Arse > 0

    Affects Arse -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_taxman
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait BadTaxman > 0

    Affects BadTaxman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_bigotwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait BigotWoman > 0

    Affects BigotWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_coldwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait ColdWoman > 0

    Affects ColdWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_corrupt
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Corrupt > 0

    Affects Corrupt -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_corrupted
    WhenToTest CharacterTurnEnd

    Condition AgentType = priest
	and not FactionIsLocal
	and Trait Corrupted > 0

    Affects Corrupted -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_coward
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Coward > 0

    Affects Coward -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_cuckold
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Cuckold > 0

    Affects Cuckold -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_cursed
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Cursed > 0

    Affects Cursed -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_deranged
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Deranged > 0

    Affects Deranged -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_desperatewo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait DesperateWoman > 0

    Affects DesperateWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_discontentgen
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait DiscontentGeneral > 0

    Affects DiscontentGeneral -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_drink
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Drink > 2

    Affects Drink -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_dykewo
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait DykeWoman > 1

    Affects DykeWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_exotictaste
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
	and not FactionIsLocal
	and Trait ExoticTastes > 0

    Affects ExoticTastes -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_expenisvetaste
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait ExpensiveTastes > 1

    Affects ExpensiveTastes -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_fearcath
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Fearscatholic > 0

    Affects Fearscatholic -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_fearisl
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Fearsislam > 0

    Affects Fearsislam -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_fearorth
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Fearsorthodox > 0

    Affects Fearsorthodox -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_fearpag
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Fearspagan > 0

    Affects Fearspagan -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_fearslave
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Fearsslave > 1

    Affects Fearsslave -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_feck
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Feck > 1

    Affects Feck -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_girls
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Girls > 1

    Affects Girls -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_haemophobic
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Haemophobic > 1

    Affects Haemophobic -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_harshwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait HarshWoman > 1

    Affects HarshWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_hypochondriac
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Hypochondriac > 0

    Affects Hypochondriac -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_infertile
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Infertile > 0

    Affects Infertile -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_infertilewo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait InfertileWoman > 0

    Affects InfertileWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_insane
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Insane > 0

    Affects Insane -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_lewd
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Lewd > 0

    Affects Lewd -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_noctophobia
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Noctophobia > 0

    Affects Noctophobia -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_perverted
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Perverted > 1

    Affects Perverted -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_publicatheism
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait PublicAtheism > 0

    Affects PublicAtheism -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_relmerch
    WhenToTest CharacterTurnEnd

    Condition AgentType = merchant
	and not FactionIsLocal
	and Trait ReligiousMerchant > 0

    Affects ReligiousMerchant -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_senile
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Senile > 0

    Affects Senile -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_slothful
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Slothful > 0

    Affects Slothful -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_strickenseri
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait StrickenSerious > 0

    Affects StrickenSerious -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_strickensill
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait StrickenSilly > 0

    Affects StrickenSilly -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_supersti
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Superstitious > 0

    Affects Superstitious -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_uglywoman
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait UglyWoman > 0

    Affects UglyWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_unchastewo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait UnchasteWoman > 1

    Affects UnchasteWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_vapidwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait VapidWoman > 0

    Affects VapidWoman -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_barrenwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait WifeIsBarren > 0

    Affects WifeIsBarren -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_horridwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait WifeIsHorrid > 0

    Affects WifeIsHorrid -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_xenoph
    WhenToTest CharacterTurnEnd

    Condition not CharacterIsLocal
	and Trait Xenophilia > 0

    Affects Xenophilia -1 Chance 70

;------------------------------------------
Trigger ai_bad_traits_bitchwo
    WhenToTest CharacterTurnEnd

    Condition AgentType = princess
	and not FactionIsLocal
	and Trait WifeIsBitch > 0

    Affects WifeIsBitch -1 Chance 70

;----------------------------------------------------
;        BYZANTINE CAREER TRIGGERS

Trigger Career_start
WhenToTest CharacterTurnEnd

Condition EndedInSettlement
and SettlementName Constantinople
and IsGeneral
and FactionType byzantium
and not IsFactionLeader
and Trait Military_Career_In_Byzantium = 0

Affects Military_Career_In_Byzantium 1 Chance 100
;----------------------------------------------------

Trigger Comes_to_Hiliarches
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 1


Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------

Trigger Hiliarches_to_Taxiarches
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 2


Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------

Trigger Taxiarches_to_Droungarios
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 3
  

Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------

Trigger Droungarios_to_Merarches
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 4
  and Trait GoodCommander >= 1

Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------
Trigger Merarches_to_Tourmarches
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 5
  and Trait GoodCommander >= 2

Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------
Trigger Tourmarches_to_Strategos
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 6
	and Trait GoodCommander >= 3


Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------
Trigger Strategos_to_Sevastos
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 7
	and Trait GoodCommander >= 4
          

Affects Military_Career_In_Byzantium  1  Chance  100
;----------------------------------------------------
Trigger Sevastos_to_Magistrus
WhenToTest CharacterTurnStart

Condition IsGeneral
	and not IsFactionLeader
	and FactionType byzantium
	and Trait Military_Career_In_Byzantium = 8
	and Trait GoodCommander >= 5
          

Affects Military_Career_In_Byzantium  1  Chance  100

;----------------------------------------------------

;Trigger Career_Get
;WhenToTest CharacterTurnEnd
;
;Condition IsGeneral
;and FactionType byzantium
;and Trait Military_Career_In_Byzantium >= 1
;and not IsFactionLeader
;
;Affects Military_Career_In_Byzantium 1 Chance 100
;---------------------------------------------------
Trigger Heir_Become_Emperor_Remove_Rank
    WhenToTest CharacterTurnStart

       Condition IsFactionLeader
	and FactionType byzantium
	and AgentType = family
	and Trait Military_Career_In_Byzantium <= 8
	and Trait Military_Career_In_Byzantium > 0
                 
        
Affects Military_Career_In_Byzantium  -68  Chance  100
;------------------------------------------
Trigger TooOldSickly
WhenToTest CharacterTurnEnd
 
Condition IsGeneral
      and CharacterAge > 61
      and Trait Sickly > 0
      and Trait TooOldToFight = 0
 
Affects TooOldToFight 1 Chance 25

;------------------------------------------
Trigger TooOldNormal
WhenToTest CharacterTurnEnd
 
Condition IsGeneral
      and CharacterAge > 61
      and Trait Sickly < 1
      and Trait Robust < 1
      and Trait TooOldToFight = 0
 
Affects TooOldToFight 1 Chance 15

;------------------------------------------
Trigger TooOldRobust
WhenToTest CharacterTurnEnd
 
Condition IsGeneral
      and CharacterAge > 61
      and Trait Robust > 0
      and Trait TooOldToFight = 0
 
Affects TooOldToFight 1 Chance 7

;------------------------------------------
Trigger Alzheimer
WhenToTest CharacterTurnEnd
 
Condition IsGeneral
      and CharacterAge > 65
 
Affects Senile 1 Chance 2
;------------------------------------------
;Byg Triggers Start Here
;------------------------------------------
;------------------------------------------
; BGR Section 1 of 2
;------------------------------------------
;Note, there are more Byg traits near the end, 6 of which are sometimes enabled/disabled. Enable/disable them if using BGR with BB&B mod if you wish.
; Their section is titled "next 6 Byg Triggers for use if BBB mod present"
;
;When installing into new mods make sure they have the building types that BGR refers to or adjust accordingly.
;------------------------------------------
;------------------------------------------
;Trigger RemoveWHTSyncTestH
;     WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait Girls = 5
;
;    Affects Prim  50  Chance  100 
;    Affects Wealth  9  Chance  100 
;
;unapplies test application of Girls to character. Remove after 1 turn.
;also apply any missing wealth here
;------------------------------------------
;------------------------------------------
; Start of X factor traits
;------------------------------------------
;default settings code
; Set x for forage. Set xest for estates
;------------------------------------------
; level 1 code: estates 2000
; level 2 code: : standard forage 200 per 1/4 army
;------------------------------------------
Trigger Xest_Factor1a_start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait xest < 1

    Affects xest  1  Chance  100
;------------------------------------------
Trigger Xest_Factor1b_start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait xest > 1

    Affects xestReset  1  Chance  100
;------------------------------------------
Trigger Xest_Factor1_becomes
    WhenToTest BecomesFactionLeader

    Condition Trait xest < 1

    Affects xest  1  Chance  100
;------------------------------------------
Trigger Xest_Factor1a
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait xest < 1

    Affects xest  1  Chance  100
;------------------------------------------
Trigger Xest_Factor1b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait xest > 1

    Affects xestReset  1  Chance  100
;------------------------------------------
Trigger X_Factor2a_start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait x < 2

    Affects x  1  Chance  100
;------------------------------------------
Trigger X_Factor2b_start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait x < 2

    Affects x  1  Chance  100
;------------------------------------------
Trigger X_Factor2_becomes1
    WhenToTest BecomesFactionLeader

    Condition Trait x < 2

    Affects x  1  Chance  100
;------------------------------------------
Trigger X_Factor2_becomes2
    WhenToTest BecomesFactionLeader

    Condition Trait x < 2

    Affects x  1  Chance  100
;------------------------------------------
Trigger X_Factor2a
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait x < 2

    Affects x  1  Chance  100
;------------------------------------------
Trigger X_Factor2b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait x < 2

    Affects x  1  Chance  100
;------------------------------------------
; End of X factor traits
;------------------------------------------
Trigger Good_Order_Reset
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait Good = 1
          and Attribute Chivalry < 6

    Affects Bad  1  Chance  100
;------------------------------------------
Trigger Bad_Order_Reset
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait Bad = 1
          and Attribute Chivalry > -6

    Affects Good  1  Chance  100
;------------------------------------------
Trigger Good_Order
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait Good < 1
          and Trait Bad < 1
          and Attribute Chivalry >= 6

    Affects Good  1  Chance  100
;------------------------------------------
Trigger Bad_Order
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsFactionLeader
          and Trait Good < 1
          and Trait Bad < 1
          and Attribute Chivalry <= -6

    Affects Bad  1  Chance  100
;------------------------------------------
Trigger HumanSpy1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait HumanSpy < 1

    Affects HumanSpy  1  Chance  100
;------------------------------------------
Trigger HumanSpy2
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HumanSpy = 1

    Affects HumanSpy  1  Chance  100
;------------------------------------------
Trigger HumanSpy3
    WhenToTest CharacterTurnStart

    Condition AgentType = spy
          and CharacterIsLocal
          and Trait HumanSpy = 1

    Affects HumanSpy  3  Chance  100
;------------------------------------------
; Army Consumpion rate and haulage ability Start Section 1
; at the moment armysize 1 is 2nd general as is unused by others.
;------------------------------------------
Trigger SizeReset4
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 4

    Affects ArmySizeReset  5  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeReset3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 3

    Affects ArmySizeReset  4  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeReset2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 2

    Affects ArmySizeReset  3  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeReset1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 1

    Affects ArmySizeReset  2  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeSet1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit >= 40

    Affects ArmySize  2  Chance  100

; would ideally be armysize 1, but such low consumption is bad for gameplay.
; now same for 1/8th army as for 1/4 army.
;------------------------------------------
Trigger SizeSet2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit >= 20
          and PercentageUnitAttribute general_unit < 40

    Affects ArmySize  2  Chance  100

;------------------------------------------
Trigger SizeSet3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit >= 10
          and PercentageUnitAttribute general_unit < 20

    Affects ArmySize  3  Chance  100

;------------------------------------------
Trigger SizeSet4
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit < 10

    Affects ArmySize  4  Chance  100

;------------------------------------------
Trigger SizeSet2ndGen
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize < 1

    Affects ArmySize  1  Chance  100

;------------------------------------------
;  Trained Unit Marker (part 1) (part 2 after scutage)
;------------------------------------------
Trigger Trained_Unit_Marker
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait RecruitedUnit < 1

    Affects RecruitedUnit  1  Chance  100
;
;------------------------------------------
; Encamped Section 1 
; all encamped Must all go before any movement affecting triggers at end turn
;------------------------------------------
Trigger EncampedResetPostBat
    WhenToTest PostBattle

    Condition IsGeneral
          and not WonBattle
          and Trait Encamped = 1

    Affects EncampedReset  2  Chance  100
    Affects Encamped  1  Chance  100

;------------------------------------------
; Encamped  Section 2
;------------------------------------------
Trigger EncampedReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait Encamped = 1

    Affects EncampedReset  2  Chance  100
    Affects Encamped  1  Chance  100

;------------------------------------------
;Trigger EncampedMove
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and Trait Move = 0
;
;    Affects Move  1  Chance  100
;
;move alter to satisfy movement quirk
;------------------------------------------
Trigger EncampedSet
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not EndedInSettlement
          and Trait TimeInField >= 1
          and RemainingMPPercentage >= 90
          and not EndedInEnemyZOC
          and not InEnemyLands
          and PopulationOwnReligion > 50
          and not IsUnderSiege
          and not AtSea

    Affects Encamped  1  Chance  100
;------------------------------------------
;Trigger EncampedMoveReset
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and Trait Move = 1
;
;    Affects MoveReset  2  Chance  100
;    Affects Move  1  Chance  100
;
;move alter to satisfy movement quirk
;------------------------------------------
; Army Consumpion rate and haulage ability End Section 2
;------------------------------------------
Trigger SizeReset4End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 4

    Affects ArmySizeReset  5  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeReset3End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 3

    Affects ArmySizeReset  4  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeReset2End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 2

    Affects ArmySizeReset  3  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeReset1End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 1

    Affects ArmySizeReset  2  Chance  100
    Affects ArmySize  1  Chance  100

;------------------------------------------
Trigger SizeSet1End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit >= 40

    Affects ArmySize  2  Chance  100

; would ideally be armysize 1, but such low consumption is bad for gameplay.
; now same for 1/8th army as for 1/4 army.
;------------------------------------------
Trigger SizeSet2End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit >= 20
          and PercentageUnitAttribute general_unit < 40

    Affects ArmySize  2  Chance  100

;------------------------------------------
Trigger SizeSet3End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit >= 10
          and PercentageUnitAttribute general_unit < 20

    Affects ArmySize  3  Chance  100

;------------------------------------------
Trigger SizeSet4End
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit < 10

    Affects ArmySize  4  Chance  100

;------------------------------------------
Trigger SizeSet2ndGenEnd
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize < 1

    Affects ArmySize  1  Chance  100

;------------------------------------------
; Supplycost resets go at start turn, following start turn script deductions, before next used.
; no longer using script for these so altering to end turn 25-08-09
;------------------------------------------
Trigger SupplyCostsReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 1

    Affects SupplyCost -1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger SupplyCostsReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 2

    Affects SupplyCost -2  Chance  100
;------------------------------------------
Trigger SupplyCostsReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 3

    Affects SupplyCost -3  Chance  100
;------------------------------------------
Trigger SupplyCostsReset4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 4

    Affects SupplyCost -4  Chance  100
;------------------------------------------
Trigger SupplyCostsReset5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 5

    Affects SupplyCost -5  Chance  100
;------------------------------------------
;  TreasuryCost resets go at start turn - following script deductions at start turn,before next used.
;------------------------------------------
Trigger TCResetStart1a
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100
    Affects TreasuryCost  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TCResetStart1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryCost >= 5

    Affects TCReset  6  Chance  100
    Affects TreasuryCost  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TCResetStart2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryCost >= 3

    Affects TCReset  4  Chance  100
    Affects TreasuryCost  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TCResetStart3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryCost >= 2

    Affects TCReset  3  Chance  100
    Affects TreasuryCost  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TCResetStart4
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryCost >= 1

    Affects TCReset  2  Chance  100
    Affects TreasuryCost  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
; TreasuryWealth resets go at start turn - following script deductions at start turn, before next used.
; because treasurywealth may be applied at any time, only start and mid turn expenditures will be visible for testing.
;------------------------------------------
Trigger TWResetStart1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryWealth >= 5

    Affects TWReset  6  Chance  100
    Affects TreasuryWealth  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TWResetStart2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryWealth >= 3

    Affects TWReset  4  Chance  100
    Affects TreasuryWealth  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TWResetStart3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryWealth >= 2

    Affects TWReset  3  Chance  100
    Affects TreasuryWealth  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TWResetStart4
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryWealth >= 1

    Affects TWReset  2  Chance  100
    Affects TreasuryWealth  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
; TreasuryNine resets go at start turn - following script deductions at start turn, before next used.
; because treasurynine may be applied at any time, only start and mid turn expenditures will be visible for testing.
;------------------------------------------
Trigger TNResetStart1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryNine >= 5

    Affects TNReset  6  Chance  100
    Affects TreasuryNine  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TNResetStart2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryNine >= 3

    Affects TNReset  4  Chance  100
    Affects TreasuryNine  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TNResetStart3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryNine >= 2

    Affects TNReset  3  Chance  100
    Affects TreasuryNine  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TNResetStart4
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TreasuryNine >= 1

    Affects TNReset  2  Chance  100
    Affects TreasuryNine  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
; WEALTH TAX Part 1 (test for need, give order)
;------------------------------------------
Trigger WealthTaxOrderCeases
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
        and CharacterIsLocal
        and Treasury >= 1000
        and Trait WealthTax > 0

    Affects WealthTaxReset  2  Chance  100 
    Affects WealthTax  1  Chance  100 

; As FL controls this tax, some generals may not be affected until next turn.
;deducts 1 level of wealth tax per turn (if more levels get added to game later)
;------------------------------------------
Trigger WealthTaxesOrdered
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
        and CharacterIsLocal
        and Treasury < 1000
        and Trait WealthTax < 1

    Affects WealthTax  1  Chance  100 

;------------------------------------------
; Estates for New Characters
;------------------------------------------
Trigger EstatesGrantedNewGens
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates < 1

    Affects Estates  2  Chance  100

;new men given Manorial Estates
;------------------------------------------
; Estates Bought by Very Rich Nobles xest=1
;------------------------------------------
Trigger EstatesWealthCheckReset_x1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger CanGeneralAffordAnEstate_x1_1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth = 9
        and I_EventCounter inflationon = 0
          and FactionLeaderTrait xest = 1

    Affects WealthCheck  1  Chance  100
    Affects Poverty  21  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusThousands  2  Chance  100

;test wealth by removing 2000
;------------------------------------------
Trigger EstatesBought_x1_2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth >= 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 0
          and FactionLeaderTrait xest = 1

    Affects Estates  1  Chance  100
    Affects WealthCheck -1  Chance  100

;buy estate if 2000 over rich wealth level.
;------------------------------------------
Trigger EstatesNotBought_x1_3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth < 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 0
          and FactionLeaderTrait xest = 1

    Affects Wealth  20  Chance  100
    Affects WealthCheck -1  Chance  100
    Affects Thousands  2  Chance  100

; dont buy estate if -2000 pushes wealth below rich.
; gives back the money removed for the test
;------------------------------------------
; Estates Bought by Very Rich Nobles During Inflation
;------------------------------------------
Trigger EstatesWealthCheckReset_Inflation_x1_1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger CanGeneralAffordAnEstate_Inflation_x1_1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth = 9
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 1

    Affects WealthCheck  1  Chance  100
    Affects Poverty  41  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusThousands  4  Chance  100

;test wealth by removing 4000
;------------------------------------------
Trigger EstatesBought_Inflation_x1_2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth >= 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 1

    Affects Estates  1  Chance  100
    Affects WealthCheck -1  Chance  100

;buy estate if 4000 over rich wealth level.
;------------------------------------------
Trigger EstatesNotBought_Inflation_x1_3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth < 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 1

    Affects Wealth  40  Chance  100
    Affects WealthCheck -1  Chance  100
    Affects Thousands  4  Chance  100

; dont buy estate if -4000 pushes wealth below rich.
; gives back the money removed for the test
;------------------------------------------
; Estates Bought by Very Rich Nobles xest=2
;------------------------------------------
Trigger EstatesWealthCheckReset_xest2_0
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger CanGeneralAffordAnEstate_xest2_1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth = 9
        and I_EventCounter inflationon = 0
          and FactionLeaderTrait xest = 2

    Affects WealthCheck  1  Chance  100
    Affects Poverty  31  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusThousands  3  Chance  100

;test wealth by removing 3000
;------------------------------------------
Trigger EstatesBought_xest2_2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth >= 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 0
          and FactionLeaderTrait xest = 2

    Affects Estates  1  Chance  100
    Affects WealthCheck -1  Chance  100

;buy estate if 3000 over rich wealth level.
;------------------------------------------
Trigger EstatesNotBought_xest2_3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth < 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 0
          and FactionLeaderTrait xest = 2

    Affects Wealth  30  Chance  100
    Affects WealthCheck -1  Chance  100
    Affects Thousands  3  Chance  100

; dont buy estate if -3000 pushes wealth below rich.
; gives back the money removed for the test
;------------------------------------------
; Estates Bought by Very Rich Nobles During Inflation
;------------------------------------------
Trigger EstatesWealthCheckReset_Inflation_xest2_1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 2

    Affects WealthCheck -1  Chance  100 

;------------------------------------------
Trigger CanGeneralAffordAnEstate_Inflation_xest2_1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth = 9
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 2

    Affects WealthCheck  1  Chance  100
    Affects Poverty  61  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusThousands  6  Chance  100

;test wealth by removing 6000
;------------------------------------------
Trigger EstatesBought_Inflation_xest2_2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth >= 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 2

    Affects Estates  1  Chance  100
    Affects WealthCheck -1  Chance  100

;buy estate if 6000 over rich wealth level.
;------------------------------------------
Trigger EstatesNotBought_Inflation_xest2_3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
        and CharacterIsLocal
          and Trait Estates >= 1
          and Trait Estates < 3
          and Trait Wealth < 8
          and Trait WealthCheck = 1
        and I_EventCounter inflationon = 1
          and FactionLeaderTrait xest = 2

    Affects Wealth  60  Chance  100
    Affects WealthCheck -1  Chance  100
    Affects Thousands  6  Chance  100

; dont buy estate if -6000 pushes wealth below rich.
; gives back the money removed for the test
;------------------------------------------
; Poverty Limits
;------------------------------------------
Trigger LimitPoverty1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait Wealth < 1
          and Trait MinusThousands > 8

    Affects Wealth  20  Chance  100
    Affects Thousands  2  Chance  100
; AI and Human Prevents wealth dipping below -8000
; else start character wealth triggers will kick in and put HunThou vs wealth out of sync. Adds up to 8000, keeping wealth out of poverty.
;------------------------------------------
Trigger LimitPoverty2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait Wealth < 1
          and Trait MinusThousands > 8

    Affects Wealth  20  Chance  100
    Affects Thousands  2  Chance  100
; AI and Human Prevents wealth dipping below -8000
; else start character wealth triggers will kick in and put HunThou vs wealth out of sync.
;------------------------------------------
Trigger LimitPoverty3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait Wealth < 1
          and Trait MinusThousands > 8

    Affects Wealth  20  Chance  100
    Affects Thousands  2  Chance  100
; AI and Human Prevents wealth dipping below -8000
; else start character wealth triggers will kick in and put HunThou vs wealth out of sync.
;------------------------------------------
Trigger LimitPoverty4
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait Wealth < 1
          and Trait MinusThousands > 8

    Affects Wealth  20  Chance  100
    Affects Thousands  2  Chance  100
; AI and Human Prevents wealth dipping below -8000
; else start character wealth triggers will kick in and put HunThou vs wealth out of sync.
;------------------------------------------
; Wealth Triggers For New Characters------ALL apply to AI too, but Tcosts etc should not charge them as Would charge human if bribed to human.
;------------------------------------------
Trigger StartWealthy1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth < 1
          and I_EventCounter inflationon = 0

    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

;new men to adeq wealth player 2100
; as the new costs are extra costs I have exempted turn zero characters from taking treasury funds.
;------------------------------------------
Trigger StartWealthy1Inflation
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth < 1
        and I_EventCounter inflationon = 1

    Affects Wealth  141  Chance  100
    Affects Thousands  4  Chance  100
    Affects Hundreds  1  Chance  100

;new men to adeq wealth player 2100
; as the new costs are extra costs I have exempted turn zero characters from taking treasury funds.
;------------------------------------------
Trigger StartWealthy1AI
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and IsFactionAIControlled
          and Trait Wealth < 1

    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

;new men to adeq wealth AI 2100
; as the new costs are extra costs I have exempted turn zero characters from taking treasury funds.
;------------------------------------------
Trigger StartWealthyAI3
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
          and IsFactionAIControlled
          and Trait Wealth < 9

    Affects Wealth  20  Chance  100
    Affects Thousands  2  Chance  100
;new King towards v.rich wealth AI Top Royalty and Leaders, 2000/turn
;------------------------------------------
Trigger StartWealthyAI4
    WhenToTest CharacterTurnStart

    Condition IsFactionHeir
          and IsFactionAIControlled
          and Trait Wealth < 9

    Affects Wealth  20  Chance  100
    Affects Thousands  2  Chance  100
;new Heir towards v.rich wealth AI Top Royalty and Leaders
;------------------------------------------
;AdoptedWealth
;------------------------------------------
Trigger AdoptedSupplies
    WhenToTest OfferedForAdoption

    Condition CharacterIsLocal
        and Trait Supplies < 1

    Affects Estates  2  Chance  100
    Affects Turnsaway  12  Chance  100
    Affects Supplies  4  Chance  100
;------------------------------------------
Trigger AdoptedAdeq
    WhenToTest OfferedForAdoption

    Condition CharacterIsLocal
        and Trait Wealth < 1
        and I_EventCounter inflationon = 0

    Affects TreasuryWealth  3  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

;unmarried adequate wealth default 2100 + supply(25% 800) = 2900
;------------------------------------------
Trigger AdoptedAdeq_Infl
    WhenToTest OfferedForAdoption

    Condition CharacterIsLocal
        and Trait Wealth < 1
        and I_EventCounter inflationon = 1

    Affects TreasuryWealth  4  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

;unmarried adequate wealth default 2100 + supply(25% 1600 infl) = 3700
;------------------------------------------
Trigger AdoptedSupplyAI
    WhenToTest OfferedForAdoption

    Condition not CharacterIsLocal
        and Trait Supplies < 1

    Affects Turnsaway  12  Chance  100
    Affects Supplies  3  Chance  100


; default 50% supply
;------------------------------------------
Trigger AdoptedAdeqAI
    WhenToTest OfferedForAdoption

    Condition not CharacterIsLocal
        and Trait Wealth < 1

    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

;note sets up AI generals, though they will not use. These trigs should cover bribed generals.
;------------------------------------------
;Man of the Hour Adoption
;------------------------------------------
Trigger AdoptedMotH1
    WhenToTest LesserGeneralOfferedForAdoption

    Condition CharacterIsLocal
          and Trait Supplies < 1
          and Trait Wealth < 1
          and I_EventCounter inflationon = 0

    Affects Estates  2  Chance  100
    Affects Wealth  121  Chance  100
    Affects TreasuryWealth  3  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Turnsaway  12  Chance  100
    Affects Supplies  4  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

; for adopted captains not generals. default adequate wealth unmarried.
;adequate wealth default 2100 + supply(25% 800) = 2900
;------------------------------------------
Trigger AdoptedMotH1_Infl
    WhenToTest LesserGeneralOfferedForAdoption

    Condition CharacterIsLocal
          and Trait Supplies < 1
          and Trait Wealth < 1
          and I_EventCounter inflationon = 1

    Affects Estates  2  Chance  100
    Affects Wealth  121  Chance  100
    Affects TreasuryWealth  4  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Turnsaway  12  Chance  100
    Affects Supplies  4  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

; for adopted captains not generals. default adequate wealth unmarried.
;adequate wealth default 2100 + supply(25% 1600) = 3700
;------------------------------------------
Trigger AdoptedMothSupplyAI
    WhenToTest LesserGeneralOfferedForAdoption

    Condition not CharacterIsLocal
          and Trait Supplies < 1

    Affects Turnsaway  12  Chance  100
    Affects Supplies  3  Chance  100

; default 50% supply
;------------------------------------------
Trigger AdoptedMotH1AI
    WhenToTest LesserGeneralOfferedForAdoption

    Condition not CharacterIsLocal
          and Trait Wealth < 1

    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100
    Affects Hundreds  1  Chance  100

; default poor wealth unmarried 1000
;------------------------------------------
;Princess Wealth and Dowry for Husband
; Princess can't get wealth due to wealth attributes
;------------------------------------------
Trigger GeneralMarryPrincessWealthDefault
    WhenToTest CharacterMarriesPrincess

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 1

    Affects Wealth  20  Chance  100
    Affects TreasuryWealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects MinusThousands  25  Chance  100
    Affects Thousands  27  Chance  100
    Affects MinusHundreds  5  Chance  100
    Affects Hundreds  5  Chance  100

;adds up to 2 wealth when gen marries Princess. 2000
;------------------------------------------
Trigger GeneralMarryPrincessWealth1
    WhenToTest CharacterMarriesPrincess

Condition Trait Wealth <= 8
          and CharacterIsLocal
          and FactionLeaderTrait Wealth >= 8

    Affects Wealth  20  Chance  100
    Affects TreasuryWealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects MinusThousands  25  Chance  100
    Affects Thousands  27  Chance  100
    Affects MinusHundreds  5  Chance  100
    Affects Hundreds  5  Chance  100

;adds up to 2 wealth when gen marries Princess if princess rich or v rich. part 1. 2000
;------------------------------------------
;Trigger GeneralMarryPrincessWealth2
;    WhenToTest CharacterMarriesPrincess
;
;    Condition Trait Wealth <= 8
;          and CharacterIsLocal
;          and FactionLeaderTrait Wealth >= 8
;
;    Affects Wealth  20  Chance  100
;    Affects TreasuryWealth  2  Chance  100 
;    Affects TreasuryCost  2  Chance  100 
;    Affects MinusThousands  1  Chance  100 
;    Affects Thousands  3  Chance  100 
;    Affects MinusHundreds  1  Chance  100 
;    Affects Hundreds  1  Chance  100 
;
;part 2. 
;------------------------------------------
;Existing General Marries-Dowry
;------------------------------------------
Trigger GeneralMarriesWealth
    WhenToTest CharacterMarries

Condition Trait Wealth <= 8
          and CharacterIsLocal

    Affects Wealth  20  Chance  100
    Affects TreasuryWealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Thousands  2  Chance  100 

; plus 20 wealth for ordinary marriage dowry +2000
;------------------------------------------
; Coming of age Men and Women
;------------------------------------------
Trigger OfAgeWealth
    WhenToTest CharacterComesOfAge

Condition Trait Wealth < 1
          and CharacterIsLocal
          and I_EventCounter inflationon = 0

    Affects Estates  2  Chance  100
    Affects Wealth  121  Chance  100
    Affects TreasuryWealth  3  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Thousands  2  Chance  100 
    Affects Hundreds  1  Chance  100 

;adequate wealth default 2100 + supply(25% 800) = 2900
;------------------------------------------
Trigger OfAgeWealth_Infl
    WhenToTest CharacterComesOfAge

Condition Trait Wealth < 1
          and CharacterIsLocal
          and I_EventCounter inflationon = 1

    Affects Estates  2  Chance  100
    Affects Wealth  141  Chance  100
    Affects TreasuryWealth  6  Chance  100 
    Affects TreasuryCost  3  Chance  100 
    Affects Thousands  4  Chance  100 
    Affects Hundreds  1  Chance  100 

;rich wealth default 2100 + supply(25% 1600 inflation) = 5700
;------------------------------------------
Trigger OfAgeWealthAI
    WhenToTest CharacterComesOfAge

Condition Trait Wealth < 1
          and not CharacterIsLocal

    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100 
    Affects Hundreds  1  Chance  100 

;Born adequate wealth
;------------------------------------------
Trigger BornWealthy1
    WhenToTest CharacterComesOfAge

Condition CharacterIsLocal
          and FatherTrait Wealth >= 8
          and Trait Wealth <= 7

    Affects Wealth  20  Chance  100
    Affects TreasuryWealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Thousands  2  Chance  100 

;------------------------------------------
;Trigger BornWealthy2
;    WhenToTest CharacterComesOfAge
;
;Condition CharacterIsLocal
;          and FatherTrait Wealth = 9
;          and Trait Wealth = 8
;
;    Affects Wealth  20  Chance  100
;    Affects TreasuryWealth  2  Chance  100 
;    Affects TreasuryCost  2  Chance  100 
;    Affects Thousands  2  Chance  100 
;
;brings wealth up to father's level (up to 6,100 in these trigs)
;------------------------------------------
; Set Newly Acquired Generals for Supplies and Field Morale (backup to startturn setups is elsewhere)
;------------------------------------------
Trigger NewGen_Byg
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
        and Trait Supplies < 1
        and CharacterIsLocal

    Affects Turnsaway  12  Chance  100
    Affects Supplies  4  Chance  100

;arrive prestart turn? 25% supplies
;------------------------------------------
Trigger NewGen_BygAI
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
        and Trait Supplies < 1
        and not CharacterIsLocal

    Affects Turnsaway  12  Chance  100
    Affects Supplies  3  Chance  100

; 50% supplies
;------------------------------------------
;New General offers marriage to family member and gets dowry
;------------------------------------------
Trigger Worthy_Of_Marriage_Byg
    WhenToTest OfferedForMarriage

    Condition CharacterIsLocal
          and Trait Supplies < 1

    Affects Estates  2  Chance  100
    Affects Turnsaway  12  Chance  100
    Affects Supplies  4  Chance  100
;------------------------------------------
Trigger MarryWealth_1
    WhenToTest OfferedForMarriage

    Condition Trait Wealth < 1
          and CharacterIsLocal
          and I_EventCounter inflationon = 0

    Affects Wealth  121  Chance  100
    Affects TreasuryWealth  3  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Thousands  2  Chance  100 
    Affects Hundreds  1  Chance  100 

;adequate wealth default 2100 + supply(25% 800) = 2900
;------------------------------------------
Trigger MarryWealth_Infl1
    WhenToTest OfferedForMarriage

    Condition Trait Wealth < 1
          and CharacterIsLocal
          and I_EventCounter inflationon = 1

    Affects Wealth  121  Chance  100
    Affects TreasuryWealth  4  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Thousands  2  Chance  100 
    Affects Hundreds  1  Chance  100 

;adequate wealth default 2100 inflation + supply(25% 1600) = 3,700
;------------------------------------------
Trigger Worthy_Of_Marriage_BygAI
    WhenToTest OfferedForMarriage

    Condition Trait Supplies < 1
        and not CharacterIsLocal

    Affects Turnsaway  12  Chance  100
    Affects Supplies  1  Chance  100

; default full supply
;------------------------------------------
Trigger MarryWealth1AI
    WhenToTest OfferedForMarriage

    Condition Trait Wealth < 1
        and Trait Poverty < 1
        and not CharacterIsLocal

    Affects Wealth  121  Chance  100
    Affects Thousands  2  Chance  100 
    Affects Hundreds  1  Chance  100 

; default poor wealth unmarried 1000
;------------------------------------------
;Trigger MarryWealth2
;    WhenToTest OfferedForMarriage
;
;Condition Trait Wealth <= 5
;          and SpouseTrait Wealth >= 5
;
;    Affects Wealth  1  Chance  100
;    Affects TreasuryWealth  1  Chance  100 
;
;more wealth if wife is as rich or richer than --wont work, spouse has no trait record
;------------------------------------------
;------------------------------------------
; War Council Generals
;------------------------------------------
;------------------------------------------
Trigger LeaderAlwaysInWarCouncil
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait WarCouncilMember < 1

    Affects WarCouncilMember  1  Chance  100

;could add 2nd level to this trait for disgruntled former War Council members, particularly Heirs!
;------------------------------------------
;Trigger WarCouncilMember
;    WhenToTest CharacterTurnStart
;
;    Condition HasAncType warcouncil
;          and CharacterIsLocal
;          and Trait WarCouncilMember < 1
;
;    Affects WarCouncilMember  1  Chance  100
;
; added "and not Trait WarCouncilMember = 1" 19-09-07. Gives WCM Trait to WC Anc holders.
;------------------------------------------
;Trigger WarCouncilTransfered1
;    WhenToTest CharacterTurnStart
;
;    Condition not HasAncType warcouncil
;          and not IsFactionLeader
;          and CharacterIsLocal
;          and Trait WarCouncilMember > 0
;
;    Affects WarCouncilMember -1  Chance  100
;
; added trigger 07-01-08, removes WCM trait if future warcouncil anc is made transferable and he gives it away. FL exempt.
;------------------------------------------
Trigger WarCouncilTransfered2
    WhenToTest CharacterTurnStart

    Condition not HasAncType warcouncil
          and CharacterIsLocal
          and not IsFactionLeader
          and Trait PoorLogistics = 2

    Affects AdvisedOnLogistics 3  Chance  100
    Affects PoorLogistics 1  Chance  100

; added trigger 07-01-08, removes Logistical Support if future warcouncil anc is made transferable and he gives it away. FL exempt.
;------------------------------------------
; HasWarchest Trait awarded to WarChest Holders & Top Generals
;------------------------------------------
;Trigger WarchestGetsProRecruitmentAuthority
;    WhenToTest CharacterTurnStart
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and HasAncType warchest
;          and Trait HasWarchest = 0
;          and not Trait DefiedOrders >= 3
;
;    Affects HasWarchest  1  Chance  100
;
; (old) warchest effect to warchest holders if not got already, unless summoned or banished, regardless of city or castle
;------------------------------------------
;Trigger WarchestGainsProRecruitmentAuthStart1
;    WhenToTest CharacterTurnStart
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and HasAncType warchest
;          and Trait HasWarchest = 0
;          and not Trait DefiedOrders >= 3
;          and GovernorTaxLevel <= tax_extortionate
;          and not SettlementBuildingExists >= motte_and_bailey
;
;    Affects HasWarchest  1  Chance  100
;
;; For LoGens (does others too, but doesn't need to)
;; in settlement, city, not criminal, not has authority,  = add authority (only WCs can get & use authority in castles)
;------------------------------------------
Trigger WarchestGainsProRecruitmentAuthEnd1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warchest
          and Trait HasWarchest = 0
          and not Trait DefiedOrders >= 3
          and GovernorTaxLevel <= tax_extortionate
          and not SettlementBuildingExists >= motte_and_bailey

    Affects HasWarchest  1  Chance  100

; For LoGens (does others too, but doesn't need to)
; in settlement, city, not criminal, not has authority,  = add authority (only WCs can get & use authority in castles)
;------------------------------------------
Trigger WarchestGainsProRecruitmentAuthGUT1
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warchest
          and Trait HasWarchest = 0
          and not Trait DefiedOrders >= 3
          and GovernorTaxLevel <= tax_extortionate
          and not SettlementBuildingExists >= motte_and_bailey

    Affects HasWarchest  1  Chance  100

; For LoGens (does others too, but doesn't need to)
; in settlement, city, not criminal, not has authority,  = add authority (only WCs can get & use authority in castles)
;------------------------------------------
;Trigger WarchestLosesProRecruitmentAuthStart
;    WhenToTest CharacterTurnStart
;
;    Condition GovernorTaxLevel <= tax_extortionate
;          and SettlementBuildingExists >= motte_and_bailey
;          and CharacterIsLocal
;          and IsGeneral
;          and not IsFactionLeader
;          and not HasAncType warcouncil
;          and Trait HasWarchest = 1
;
;    Affects HasWarchestReset  2  Chance  100
;    Affects HasWarchest  1  Chance  100
;
;; Governor of castle, not fl, not WC, has authority = remove authority (only WCs can use authority in castles)
;------------------------------------------
Trigger WarchestLosesProRecruitmentAuthEnd
    WhenToTest CharacterTurnEnd

    Condition GovernorTaxLevel <= tax_extortionate
          and SettlementBuildingExists >= motte_and_bailey
          and CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and not HasAncType warcouncil
          and Trait HasWarchest = 1

    Affects HasWarchestReset  2  Chance  100
    Affects HasWarchest  1  Chance  100

; gov of castle, not fl, not WC, has authority = remove authority (only WCs can use authority in castles)
;------------------------------------------
Trigger WarchestLosesProRecruitmentAuthGUT
    WhenToTest GovernorUnitTrained

    Condition GovernorTaxLevel <= tax_extortionate
          and SettlementBuildingExists >= motte_and_bailey
          and CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and not HasAncType warcouncil
          and Trait HasWarchest = 1

    Affects HasWarchestReset  2  Chance  100
    Affects HasWarchest  1  Chance  100

; gov of castle, not fl, not WC, has authority = remove authority (only WCs can use authority in castles)
;------------------------------------------
Trigger WarCouncilGetsProRecruitmentAuthorityStart
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait HasWarchest = 0
          and not Trait DefiedOrders >= 3

    Affects HasWarchest  1  Chance  100

; warchest effect to warcouncil holders if not got already, unless summoned or banished
;------------------------------------------
Trigger WarCouncilGetsProRecruitmentAuthorityEnd
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait HasWarchest = 0
          and not Trait DefiedOrders >= 3

    Affects HasWarchest  1  Chance  100

; warchest effect to warcouncil holders if not got already, unless summoned or banished
; using this at end turn alone makes recruit claims and unclaims both go off, don't use.
; because recruit before end turn.then this .then claims. So use unittrained. (merchire is resilient)
;------------------------------------------
Trigger WarCouncilGetsProRecruitmentAuthorityGUT
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait HasWarchest = 0
          and not Trait DefiedOrders >= 3

    Affects HasWarchest  1  Chance  100

; warchest effect to warcouncil holders if not got already, unless summoned or banished
; using this at end turn makes recruit claims and unclaims both go off, don't use.
; because recruit happens before end turn.then this .then claims. so use govunittrained
;------------------------------------------
Trigger LeaderGetsProRecruitmentAuthority
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and IsFactionLeader
          and Trait HasWarchest = 0

    Affects HasWarchest  1  Chance  100

; warchest effect to Leader, if not got already
;------------------------------------------
Trigger ProTrainersNotOwnedLoGens
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType warchest
          and not HasAncType warcouncil
          and not IsFactionLeader
          and Trait HasWarchest = 1

    Affects HasWarchestReset  2  Chance  100
    Affects HasWarchest  1  Chance  100

; recruit authority removed from ex warchest  (pro Trainers) holders, except King & WCs
;------------------------------------------
; Reset JrWC (preserve gainmessages)
;------------------------------------------
Trigger JrWC_DO_Reset1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait JrWarCouncillor = 1
          and Trait DefiedOrders >= 3

    Affects JrWarCouncillorReset  1  Chance  100

; do same for end turn
;------------------------------------------
Trigger JrWC_DO_Reset2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait JrWarCouncillor = 2
          and Trait DefiedOrders >= 3

    Affects JrWarCouncillorReset  2  Chance  100

; defied orders
;------------------------------------------
Trigger JrWC_WC_Owned_Resetlvl1_start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait JrWarCouncillor = 1

    Affects JrWarCouncillorReset  1  Chance  100

; jrwc lvl 1 dropped to 0 if wc
;------------------------------------------
Trigger JrWC_WC_Owned_Resetlvl1_end
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait JrWarCouncillor = 1

    Affects JrWarCouncillorReset  1  Chance  100

; jrwc lvl 1 dropped to 0 if wc
;------------------------------------------
Trigger JrWC_WC_Owned_Resetlvl2_start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait JrWarCouncillor = 2

    Affects JrWarCouncillorReset  2  Chance  100

; jrwc lvl 2 dropped to 1 if wc
;------------------------------------------
Trigger JrWC_WC_Owned_Resetlvl2_end
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait JrWarCouncillor = 2

    Affects JrWarCouncillorReset  2  Chance  100

; jrwc lvl 2 dropped to 1 if wc
;------------------------------------------
Trigger JrWC_WC_Owned_Resetlvl2_unittrained
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType warcouncil
          and Trait JrWarCouncillor = 2

    Affects JrWarCouncillorReset  2  Chance  100

; jrwc lvl 2 dropped to 1 if no PTS
;------------------------------------------
;Trigger JrWC_RL_Resetlvl1
;    WhenToTest GovernorUnitTrained
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait JrWarCouncillor = 1
;          and Trait RecruitLimit = 0
;
;    Affects JrWarCouncillorReset  1  Chance  100
;
;; recruit limit out remove JrWC (blocked..may not have been given recruitllimit yet)
;------------------------------------------
;Trigger JrWC_RL_Resetlvl2
;    WhenToTest GovernorUnitTrained
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait JrWarCouncillor = 2
;          and Trait RecruitLimit < 1
;
;    Affects JrWarCouncillorReset  2  Chance  100
;
; recruit limit out remove JrWC
;------------------------------------------
Trigger JrWC_ProTrainersNotOwned_Resetlvl2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType warchest
          and Trait JrWarCouncillor = 2

    Affects JrWarCouncillorReset  1  Chance  100

; jrwc lvl 2 dropped to 1 if no PTS
;------------------------------------------can use building check at start turn?
;Trigger JrWC_Level2_Reset_Start
;    WhenToTest CharacterTurnStart
;
;    Condition not SettlementBuildingExists >= motte_and_bailey
;          and CharacterIsLocal
;          and IsGeneral
;          and Trait JrWarCouncillor = 2
;
;    Affects JrWarCouncillorReset  1  Chance  100
;
;; leave castle drop lvl 2 to lvl 1
;------------------------------------------
Trigger JrWC_Level2_Reset_End
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and not SettlementBuildingExists >= motte_and_bailey
          and CharacterIsLocal
          and IsGeneral
          and Trait JrWarCouncillor = 2

    Affects JrWarCouncillorReset  1  Chance  100

; leave castle drop lvl 2 to lvl 1
;------------------------------------------
Trigger JrWC_Level2_Reset_Unittrained
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and not SettlementBuildingExists >= motte_and_bailey
          and CharacterIsLocal
          and Trait JrWarCouncillor = 2

    Affects JrWarCouncillorReset  1  Chance  100

; leave castle drop lvl 2 to lvl 1
;------------------------------------------
; Jr War Councillor Assigned lvl 2
;------------------------------------------
Trigger JrWC_Level2_End
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and SettlementBuildingExists >= motte_and_bailey
          and CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and not HasAncType warcouncil
          and HasAncType warchest
          and Trait JrWarCouncillor = 1
          and not Trait DefiedOrders >= 3

    Affects JrWarCouncillor  1  Chance  100

; in settlement, not WC, Not FL, Has PTS, has level 1 JrWC, move to level 2
;------------------------------------------
; Do for all instances of gaining either haswarchest or jrwc
;
; only need end turn for actual recruitment effect (moved end turns to nr end of traits)
; others can be used to help reflect recruitment summaries correctly, which are currently only start turn.
;------------------------------------------
Trigger JrWC_Off_StartReset
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait JrWCOff = 1

    Affects JrWCOffReset  1  Chance  100

; reset jrwcoff all factions
;------------------------------------------
Trigger JrWC_Off_Start1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 1
          and Trait JrWCOff < 1
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; add jrwc removeeffect if haswarchest = 1
;------------------------------------------
Trigger JrWC_Off_Start_noPTS
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest < 1
          and not HasAncType warchest
          and Trait JrWCOff < 1
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; add jrwc removeeffect if haswarchest = 0 & no PTS
;------------------------------------------
Trigger JrWC_Off_Start_WealthLow
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait JrWCOff < 1
          and Trait Wealth <= 6
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; set jrwcoff if too poor
;------------------------------------------
Trigger JrWC_OffReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait JrWCOff = 1

    Affects JrWCOffReset  1  Chance  100

; reset jrwcoff all factions
;------------------------------------------
Trigger JrWC_Off1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 1
          and Trait JrWCOff < 1
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; add jrwc removeeffect if haswarchest = 1
;------------------------------------------
Trigger JrWC_Off_End_noPTS
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest < 1
          and not HasAncType warchest
          and Trait JrWCOff < 1
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; add jrwc removeeffect if haswarchest = 0 & no PTS
;------------------------------------------
Trigger JrWC_OffGUTReset
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and Trait JrWCOff = 1

    Affects JrWCOffReset  1  Chance  100

; reset jrwcoff
;------------------------------------------
Trigger JrWC_OffGUT_HasWarChest
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 1
          and Trait JrWCOff < 1
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; add jrwc removeeffect if haswarchest = 1
;------------------------------------------
Trigger JrWC_OffGUT_noPTS
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest < 1
          and not HasAncType warchest
          and Trait JrWCOff < 1
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; add jrwc removeeffect if haswarchest = 0 and no PTS
;------------------------------------------
Trigger JrWC_OffGUT_WealthLow
    WhenToTest GovernorUnitTrained

    Condition IsGeneral
          and CharacterIsLocal
          and Trait JrWCOff < 1
          and Trait Wealth <= 6
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; set jrwcoff if too poor
;------------------------------------------
; JrWC unit trained Reset
;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 1
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  1  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 2
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  2  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 3
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  3  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 4
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  4  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 5
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  5  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 6
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  6  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end7
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 7
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  7  Chance  100

;------------------------------------------
Trigger JrWC_RecruitLimit_reset_end8
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait RecruitLimit = 8
          and Trait JrWarCouncillor < 1

    Affects RecruitLimitReset  8  Chance  100

;------------------------------------------
; JrWC unit trained decrement
;------------------------------------------
Trigger JrWC_RecruitLimit_passed_EndDuty
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and SettlementBuildingExists >= motte_and_bailey
          and Trait JrWarCouncillor = 2
          and Trait RecruitLimit = 1

    Affects RecruitLimitReset  1  Chance  100
    Affects JrWarCouncillorReset  2  Chance  100

;when 1 limit remains
;------------------------------------------
Trigger JrWC_RecruitLimit_remaining_Decrement
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and SettlementBuildingExists >= motte_and_bailey
          and Trait JrWarCouncillor = 2
          and Trait RecruitLimit >= 2

    Affects RecruitLimitReset  1  Chance  100

;when 2 or more limit remains
;------------------------------------------
; Award JrWC lvl 1 for Great Victories & Status
;(some of these must match corresponding estate earning triggers further on)
;------------------------------------------
Trigger JrWC_Via_Battle_Estates_cp3or4
    WhenToTest PostBattle

    Condition IsGeneral
          and not HasAncType warcouncil
          and not IsFactionLeader
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait MVC = 1
          and Trait DefiedOrders <= 1
          and PercentageUnitAttribute general_unit < 7
          and Trait JrWarCouncillor < 1
          and Trait RecruitLimit < 1
          and FactionLeaderTrait CentralisedPower >= 3

    Affects JrWarCouncillor  1  Chance  100
    Affects Wealth  10  Chance  100
    Affects Thousands  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects RecruitLimit  4  Chance  100

;must match & trigger alongside estates earned, professional periods(if already have 1 MVC, now have 2)
;------------------------------------------
Trigger JrWC_Via_Conquest_Estates
    WhenToTest PostBattle

    Condition IsGeneral
          and not HasAncType warcouncil
          and not IsFactionLeader
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait DefiedOrders < 2
          and Trait JrWarCouncillor < 1
          and Trait RecruitLimit < 1

    Affects JrWarCouncillor  1  Chance  100
    Affects Wealth  10  Chance  100
    Affects Thousands  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects RecruitLimit  4  Chance  100

;must match & trigger alongside estates earned
;------------------------------------------
Trigger JrWC_Major_Victories_Count_cp1or2
    WhenToTest PostBattle

    Condition IsGeneral
          and not HasAncType warcouncil
          and not IsFactionLeader
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and PercentageUnitAttribute general_unit < 7
          and not Trait DefiedOrders >= 2
          and FactionLeaderTrait CentralisedPower <= 2
          and Trait JrWarCouncillor < 1
          and Trait RecruitLimit < 1

    Affects JrWarCouncillor  1  Chance  100
    Affects Wealth  10  Chance  100
    Affects Thousands  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects RecruitLimit  4  Chance  100

;for generals who are already gt estate owners (or not) + 1 major victory, unprofessional periods
;------------------------------------------
Trigger JrWC_GtEstates
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType warcouncil
          and not IsFactionLeader
          and Trait JrWarCouncillor < 1
;          and Trait Wealth = 9
          and Trait Estates = 3
          and not Trait DefiedOrders >= 3
          and FactionLeaderTrait CentralisedPower <= 2
          and Trait RecruitLimit < 1
          and RandomPercent < 5

    Affects JrWarCouncillor  1  Chance  100
    Affects Wealth  10  Chance  100
    Affects Thousands  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects RecruitLimit  4  Chance  100

;if with great estates whilst faction is unprofessional or uncentralised, random chance
; This means he MAY repeatedly get JrWC as long as he has gt estates
;------------------------------------------
Trigger JrWC_GtEstates_VRich
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType warcouncil
          and not IsFactionLeader
          and Trait JrWarCouncillor < 1
          and Trait Wealth = 9
          and Trait Estates = 3
          and not Trait DefiedOrders >= 3
          and FactionLeaderTrait CentralisedPower >= 3
          and Trait RecruitLimit < 1
          and RandomPercent < 5

    Affects JrWarCouncillor  1  Chance  100
    Affects Wealth  10  Chance  100
    Affects Thousands  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects RecruitLimit  4  Chance  100

;if with great estates whilst faction is unprofessional or uncentralised, random chance
; This means he MAY repeatedly get JrWC as long as he has gt estates & v rich
;------------------------------------------
; Recruitment Ability Update StartTurn
; (recruitment ability wont show if over 10 Char. So good guide to error.
;------------------------------------------

Trigger Recruitment_desc_reset1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentAbility > 0

    Affects RecruitmentAbility -1  Chance 100

;------------------------------------------
Trigger Recruitment_desc_reset2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentAbility > 0

    Affects RecruitmentAbility -1  Chance 100

;------------------------------------------
Trigger Recruitment_desc_reset3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentAbility > 0

    Affects RecruitmentAbility -1  Chance 100

;------------------------------------------
Trigger Recruitment_Descriptions1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Attribute Charm = 10

    Affects RecruitmentAbility  1  Chance 100

;------------------------------------------
Trigger Recruitment_Descriptions2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Attribute Charm <= 9
          and Attribute Charm >= 5

    Affects RecruitmentAbility  2  Chance 100

;------------------------------------------
Trigger Recruitment_Descriptions3
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Attribute Charm <= 4

    Affects RecruitmentAbility  3  Chance 100

;------------------------------------------
;LogisticalSupport
;------------------------------------------
Trigger LeaderAlwaysHasLogSupport1
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait PoorLogistics < 1

    Affects PoorLogistics  2  Chance  100

;gives logistical support to FL even without WC Anc
;------------------------------------------
Trigger LeaderAlwaysHasLogSupport2
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait PoorLogistics = 1

    Affects PoorLogistics  1  Chance  100

;gives logistical support to FL even without WC Anc
;------------------------------------------
Trigger Good_Logistics
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait PoorLogistics < 1
          and HasAncType warcouncil
          and not Trait DefiedOrders >= 3

    Affects PoorLogistics  2  Chance  100

;added to the 3 prime generals...Requires warcouncil Ancillary! Gets if  does not have this trait. Always keeps this level
;------------------------------------------
Trigger Good_LogisticsEnd
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait PoorLogistics < 1
          and HasAncType warcouncil
          and not Trait DefiedOrders >= 3

    Affects PoorLogistics  2  Chance  100

;added to the 3 prime generals...Requires warcouncil Ancillary! Gets if  does not have this trait. Always keeps this level. for end turn.
;------------------------------------------
Trigger Good_Logistics2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait PoorLogistics = 1
          and HasAncType warcouncil
          and not Trait DefiedOrders >= 3

    Affects PoorLogistics  1  Chance  100

;added to the 3 prime generals...Requires warcouncil Ancillary! Gets even if has poor logistician level. Always keeps this level
;------------------------------------------
; War Council Earnings/Logen Earnings Feudal and Post Feudal
;------------------------------------------
; Banished would still earn if governing, until moves out.
;------------------------------------------
; Earn resets go at End turn - following deductions at start turn, before first instance.
;------------------------------------------
Trigger EarnResetEnd1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Earn >= 5

    Affects Earn  -5  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger EarnResetEnd2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Earn >= 3

    Affects Earn  -3  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger EarnResetEnd3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Earn >= 2

    Affects Earn  -2  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger EarnResetEnd4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Earn >= 1

    Affects Earn  -1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
; Earn 100 (any castle and low tax city) to 400 (highest tax city)
;
; BGR requires these market levels: corn_exchange market fairground great_market merchants_quarter
; BGR requires this minimum wall level to be present: wooden_pallisade
;if not present in your mod then alter refs here to match your EDB.
;------------------------------------------
; Resets Tax Effects (chips upto 4 down to 0)
;------------------------------------------
Trigger ResetTaxEffects1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait TaxEffect >= 2

    Affects TaxEffectReset  3  Chance  100 
    Affects TaxEffect  1  Chance  100

;------------------------------------------
Trigger ResetTaxEffects2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait TaxEffect >= 2

    Affects TaxEffectReset  2  Chance  100 
    Affects TaxEffect  1  Chance  100

;------------------------------------------
Trigger ResetTaxEffects3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait TaxEffect >= 1

    Affects TaxEffectReset  2  Chance  100 
    Affects TaxEffect  1  Chance  100

;------------------------------------------
Trigger GovernBasicTaxCityAnyCastle
    WhenToTest CharacterTurnEnd

    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
;          and Trait Wealth < 9
;          and FactionLeaderTrait CentralisedPower <= 1

    Affects Wealth  1  Chance  100 
    Affects Earn  1  Chance  100
    Affects TreasuryCost  1  Chance  100 
    Affects TaxEffect  1  Chance  100 
    Affects Hundreds  1  Chance  100 

;add Earnings, 1 per turn, governing all settlements. (old-Right to Knight)
;------------------------------------------
;Trigger GovernTaxCityLow
;    WhenToTest CharacterTurnEnd
;
;    Condition GovernorTaxLevel = tax_low
;          and SettlementBuildingExists >= wooden_pallisade
;          and SettlementBuildingExists > corn_exchange
;          and CharacterIsLocal
;          and TimeInRegion > 4
;;          and Trait Wealth < 9
;;          and FactionLeaderTrait CentralisedPower <= 1
;
;    Affects Wealth  1  Chance  100 
;    Affects Earn  1  Chance  100 
;    Affects TreasuryCost  1  Chance  100 
;
;;has governed a while,starts to take a cut,(old-feudal period), extortionate tax. Also gets earn from previous trigger.
;; this trigger is not required unless earnings are to differ for low tax cities & any tax castles.
;------------------------------------------
Trigger GovernTaxCityNormal
    WhenToTest CharacterTurnEnd

    Condition GovernorTaxLevel = tax_normal
          and SettlementBuildingExists >= wooden_pallisade
          and SettlementBuildingExists > market
          and CharacterIsLocal
          and TimeInRegion > 4
;          and Trait Wealth < 9
;          and FactionLeaderTrait CentralisedPower <= 1

    Affects Wealth  1  Chance  100 
    Affects Earn  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TaxEffect  1  Chance  100 
    Affects Hundreds  1  Chance  100 

;has governed a while,starts to take a cut,(old-feudal period), extortionate tax. Also gets earn from 1st trigger.
;------------------------------------------
Trigger GovernTaxCityHigh
    WhenToTest CharacterTurnEnd

    Condition GovernorTaxLevel = tax_high
          and SettlementBuildingExists >= wooden_pallisade
          and SettlementBuildingExists > market
          and CharacterIsLocal
          and TimeInRegion > 4
;          and Trait Wealth < 9
;          and FactionLeaderTrait CentralisedPower <= 1

    Affects Wealth  2  Chance  100 
    Affects Earn  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects TaxEffect  2  Chance  100 
    Affects Hundreds  2  Chance  100 

;has governed a while,starts to take a cut,(old-feudal period), extortionate tax. Also gets earn from 1st trigger.
;------------------------------------------
Trigger GovernTaxCityExtortionate
    WhenToTest CharacterTurnEnd

    Condition GovernorTaxLevel = tax_extortionate
          and SettlementBuildingExists >= wooden_pallisade
          and SettlementBuildingExists > market
          and CharacterIsLocal
          and TimeInRegion > 4
;          and Trait Wealth < 9
;          and FactionLeaderTrait CentralisedPower <= 1

    Affects Wealth  3  Chance  100 
    Affects Earn  3  Chance  100 
    Affects TreasuryCost  3  Chance  100 
    Affects TaxEffect  3  Chance  100 
    Affects Hundreds  3  Chance  100 

;has governed a while,starts to take a cut,(old-feudal period), extortionate tax. Also gets earn from 1st trigger.
;------------------------------------------
Trigger FLEarlyFeudal
    WhenToTest CharacterTurnEnd

;    Condition EndedInSettlement
    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
          and IsFactionLeader
          and Trait Wealth < 9
;*          and Trait Thousands < 9
          and Treasury >= 2000
          and Trait CentralisedPower = 1

    Affects Wealth  2  Chance  100 
    Affects Earn  2  Chance  100
    Affects TreasuryCost  2  Chance  100 
    Affects Hundreds  2  Chance  100 

; Collect Wealth from Treasury if any there, 200 per turn, in settlement, plus previous gov earnings, 100 to 400. If treasury >= 2000 & < v rich.
;------------------------------------------
Trigger FLEarnLateFeudal
    WhenToTest CharacterTurnEnd

;    Condition EndedInSettlement
    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
          and IsFactionLeader
          and Trait Wealth < 9
;*          and Trait Thousands < 9
          and Treasury >= 2000
          and Trait CentralisedPower >= 2

    Affects Wealth  3  Chance  100 
    Affects Earn  3  Chance  100
    Affects TreasuryCost  3  Chance  100 
    Affects Hundreds  3  Chance  100 

; Collect Wealth from Treasury if any there, 300 per turn, in settlement, plus previous gov earnings, 100 to 400. If treasury >= 2000 & < v rich.
;------------------------------------------
Trigger FLDipsIntoTreasuryFundsUnseen
    WhenToTest CharacterTurnEnd

;    Condition EndedInSettlement
    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
          and IsFactionLeader
          and Trait Wealth < 7
;*          and Trait Thousands < 1
;*          and Trait Hundreds < 1
          and Treasury >= 1000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Thousands  1  Chance  100 

; Collect Wealth from Treasury if any there, 1000 per turn, in settlement, (plus FLearns and previous gov earnings, 100 to 400). If treasury >= 1000 & < broke.
;------------------------------------------
Trigger FLDipsIntoTreasuryDebtForMoneyLendersUnseen
    WhenToTest CharacterTurnEnd

;    Condition EndedInSettlement
    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
          and IsFactionLeader
          and Trait Debt > 0
;*          and Trait Thousands < 1
;*          and Trait Hundreds < 1
          and Treasury < 1000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Thousands  1  Chance  100 

; Borrow via Treasury if none there & FL has Loan, 1000 per turn, in settlement, (plus FLearns and previous gov earnings, 100 to 400). If treasury < 1000 & Borrowed.
;------------------------------------------
Trigger FLDipsIntoTreasuryDebtForSelfUnseen
    WhenToTest CharacterTurnEnd

;    Condition EndedInSettlement
    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
          and IsFactionLeader
          and Trait Wealth < 7
          and Trait Debt = 0
;*          and Trait Thousands < 1
;*          and Trait Hundreds < 1
          and Treasury < 1000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Thousands  1  Chance  100 

; Borrow via Treasury if none there & FL has Loan, 1000 per turn, in settlement, (plus FLearns and previous gov earnings, 100 to 400). If treasury < 1000 & < Not Borrowed.
;------------------------------------------
Trigger WCEarn
    WhenToTest CharacterTurnEnd

;    Condition EndedInSettlement
    Condition GovernorTaxLevel <= tax_extortionate
          and CharacterIsLocal
          and not IsFactionLeader
          and IsGeneral
          and HasAncType warcouncil
;          and Trait Wealth < 9
        and Trait DefiedOrders <= 3

    Affects Wealth  1  Chance  100 
    Affects Earn  1  Chance  100
    Affects TreasuryCost  1  Chance  100 
    Affects Hundreds  1  Chance  100 
;wc add Earnings, another 100 per turn, in any settlement, during any order period, plus previous gov earnings, 100 to 200.
;------------------------------------------
Trigger EstatesEarn1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and CharacterIsLocal
        and Trait Estates = 2
;          and Trait Wealth < 9
        and Trait DefiedOrders <= 3

    Affects Earn  1  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects Hundreds  1  Chance  100 

; Earn 100 for estate owners (level 2 = 1 estate, level 3 = 2 estates or larger one)
;------------------------------------------
Trigger EstatesEarn2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and CharacterIsLocal
        and Trait Estates = 3
;          and Trait Wealth < 9
        and Trait DefiedOrders <= 3

    Affects Earn  2  Chance  100 
    Affects Wealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects Hundreds  2  Chance  100 

; Earn 200 for great estate owners (level 2 = 1 estate, level 3 = 2 estates or larger one)
;------------------------------------------
; END SECTION 6 for earnings (max -900), but used double reckoner
; Needed for Additions Or Both Additions and Deductions pt 1
;------------------------------------------
Trigger HundredsWealthCheckResetEndEarn1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1EndEarn1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2EndEarn1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Additions Or Both Additions and Deductions pt 2
;------------------------------------------
Trigger HundredsWealthCheckResetEndEarn2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1EndEarn2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2EndEarn2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEndEarn
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEndEarn
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; TAX RESETS (go at End turn, before any Taxes - following deductions at start turn.)
;------------------------------------------
Trigger TaxResetEnd1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Tax >= 5

    Affects TaxReset  6  Chance  100
    Affects Tax  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TaxResetEnd2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Tax >= 3

    Affects TaxReset  4  Chance  100
    Affects Tax  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TaxResetEnd3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Tax >= 2

    Affects TaxReset  3  Chance  100
    Affects Tax  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger TaxResetEnd4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Tax >= 1

    Affects TaxReset  2  Chance  100
    Affects Tax  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
; SCUTAGE
;
; (FL Order & Gens order received operate independently, the op is planned so order recieved fast)
;------------------------------------------
Trigger ScutageOrderReset
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ExpeditionTaxOrder > 0
          and I_EventCounter militaryactive = 0

    Affects ExpeditionTaxOrderReset  2  Chance  100 
    Affects ExpeditionTaxOrder  1  Chance  100 

;FL scutage Order trait removed
; scutage reset only resets when applicable so gains can be used.removes from any player/ai and any gen.
;------------------------------------------
Trigger ScutageNewWCReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait ExpeditionTax > 0
          and HasAncType warcouncil

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  1  Chance  100 

;New WC scutage trait removed
; scutage reset only resets when applicable so gains can be used.removes from any player/ai and WC.
;------------------------------------------
Trigger ScutageNewFLReset
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ExpeditionTax > 0

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  1  Chance  100 

;New WC scutage trait removed
; scutage reset only resets when applicable so gains can be used.removes from any player/ai and WC.
;------------------------------------------
Trigger ScutageReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait ExpeditionTax > 0
          and I_EventCounter militaryactive = 0

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  1  Chance  100 

;gens scutage trait removed
; scutage reset only resets when applicable so gains can be used.removes from any player/ai and any gen.
;------------------------------------------
Trigger ScutageResetBanished
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait ExpeditionTax > 0
          and Trait DefiedOrders = 4

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  1  Chance  100 

;gens trait removed
; scutage reset for banished generals
;------------------------------------------
Trigger ScutageResetWeakGrip
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and Trait ExpeditionTax > 0
          and FactionLeaderTrait ReinsOfPower = 1
          and Attribute Loyalty <= 2

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  1  Chance  100 

;gens trait removed
; scutage reset for all low loyalty generals with weak king after 1 payment
;------------------------------------------
Trigger ScutageOrdered
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and CharacterIsLocal
        and Trait ExpeditionTaxOrder = 0
        and I_EventCounter militaryactive = 1

    Affects ExpeditionTaxOrder  1  Chance  100 

;logen scutage/taxes ordered whilst WC/King in foreign land
;------------------------------------------
Trigger ScutageLoGens
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
;        and GovernorTaxLevel <= tax_extortionate
        and CharacterIsLocal
        and Trait ExpeditionTax = 0
        and not IsFactionLeader
        and not HasAncType warcouncil
        and I_EventCounter militaryactive = 1
        and Trait DefiedOrders <= 3

    Affects ExpeditionTax  1  Chance  100 

;Logens receive scutage trait (if not banished)
;logen scutage/taxes whilst others (WC/King) in foreign land
;------------------------------------------
Trigger ScutageCostGov_Claiming
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and CharacterIsLocal
        and GovernorTaxLevel <= tax_extortionate
        and Trait ExpeditionTax > 0
        and Trait HasWarChest = 1

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 

; scutage cost 100 for All Governors
;------------------------------------------
Trigger ScutageCostEstates_Claiming
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and CharacterIsLocal
        and Trait Estates >= 2
        and Trait ExpeditionTax > 0
        and Trait HasWarChest = 1

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 

; scutage cost 100 for estate owners (regardless of number of estates)
; Could add exemption for being in enemy land, but would that be unrealistic?
;------------------------------------------
Trigger ScutageCostGov_NotClaiming
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and CharacterIsLocal
        and GovernorTaxLevel <= tax_extortionate
        and Trait ExpeditionTax > 0
        and Trait RecruitedUnit < 1
        and Trait HasWarChest = 0

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 

; scutage cost 100 for All Governors
;------------------------------------------
Trigger ScutageCostEstates_NotClaiming
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and CharacterIsLocal
        and Trait Estates >= 2
        and Trait ExpeditionTax > 0
        and Trait RecruitedUnit < 1
        and Trait HasWarChest = 0

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 

; scutage cost 100 for estate owners (regardless of number of estates)
; Could add exemption for being in enemy land, but would that be unrealistic?
;------------------------------------------
;  Trained Unit Marker (part 2) (part 1 nr start of bgr triggers)
;------------------------------------------
Trigger Trained_Unit_Marker_Reset
    WhenToTest CharacterTurnEnd

    Condition Trait RecruitedUnit = 1

    Affects RecruitedUnitReset  1  Chance  100
;resets for ai and players
;------------------------------------------
; END SECTION  5 Scutage Tax (up to -200)
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndST
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndST
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndST
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEndST
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEndST
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; Ransoms & conquests for all generals
;------------------------------------------
Trigger RansomAllGensWealth_100
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 100
          and RansomAmount < 200
;          and Trait Wealth < 9

    Affects Wealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_200
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 200
          and RansomAmount < 300
;          and Trait Wealth < 9

    Affects Wealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  12  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_300
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 300
          and RansomAmount < 400
;          and Trait Wealth < 9

    Affects Wealth  3  Chance  100 
    Affects TreasuryCost  3  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  13  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_400
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 400
          and RansomAmount < 500
;          and Trait Wealth < 9

    Affects Wealth  4  Chance  100 
    Affects TreasuryCost  4  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  14  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_500
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 500
          and RansomAmount < 600
;          and Trait Wealth < 9

    Affects Wealth  5  Chance  100 
    Affects TreasuryCost  5  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  15  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_600
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 600
          and RansomAmount < 700
;          and Trait Wealth < 9

    Affects Wealth  6  Chance  100 
    Affects TreasuryCost  6  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  16  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_700
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 700
          and RansomAmount < 800
;          and Trait Wealth < 9

    Affects Wealth  7  Chance  100 
    Affects TreasuryCost  7  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  17  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_800
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 800
          and RansomAmount < 900
;          and Trait Wealth < 9

    Affects Wealth  8  Chance  100 
    Affects TreasuryCost  8  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  18  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomAllGensWealth_900
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 900
          and RansomAmount < 1000
;          and Trait Wealth < 9

    Affects Wealth  9  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  19  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
; Ransoms & conquests for ordinary generals
;------------------------------------------
Trigger RansomWealthy1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 1000
;          and Trait Wealth < 9
          and not IsFactionLeader
          and not HasAncType warcouncil

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomWealthy2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 2000
;          and Trait Wealth < 9
          and not IsFactionLeader
          and not HasAncType warcouncil

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 2 added
;------------------------------------------
Trigger RansomWealthy3
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 3000
;          and Trait Wealth < 9
          and not IsFactionLeader
          and not HasAncType warcouncil

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 3 added
;------------------------------------------
Trigger CaptureSettlementWealthy
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
;          and Trait Wealth < 9
          and not IsFactionLeader
          and not HasAncType warcouncil

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy1
    WhenToTest SackSettlement

    Condition CharacterIsLocal
;          and Trait Wealth < 9
          and not IsFactionLeader
          and not HasAncType warcouncil

    Affects Wealth  20  Chance  100 
    Affects TreasuryWealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  22  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
; for FL 
;(takes money for himself if less than adequate)
;------------------------------------------
Trigger RansomWealthyFL1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 1000
          and Trait Wealth < 7
          and IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomWealthyFL2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 2000
          and Trait Wealth < 7
          and IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 2 added
;------------------------------------------
Trigger RansomWealthyFL3
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 3000
          and Trait Wealth < 7
          and IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 3 added
;------------------------------------------
Trigger CaptureSettlementWealthyFL
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Wealth < 7
          and IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy1FL
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Wealth < 7
          and IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
;(takes money for himself if at least adequate and treasury does not need it)
;------------------------------------------
Trigger RansomWealthyFL1T
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 1000
          and Trait Wealth >= 7
          and IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomWealthyFL2T
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 2000
          and Trait Wealth >= 7
          and IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 2 added
;------------------------------------------
Trigger RansomWealthyFL3T
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 3000
          and Trait Wealth >= 7
          and IsFactionLeader
          and Treasury > 10000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 3 added
;------------------------------------------
Trigger CaptureSettlementWealthyFLT
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Wealth >= 7
          and IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy1FLT
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Wealth >= 7
          and IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy2FLT
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Wealth >= 7
          and IsFactionLeader
          and Treasury > 10000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
; for WCs 
;(take money for themselves if less than adequate wealth)
;------------------------------------------
Trigger RansomWealthyWC1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 1000
          and Trait Wealth < 7
          and HasAncType warcouncil
          and not IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomWealthyWC2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 2000
          and Trait Wealth < 7
          and HasAncType warcouncil
          and not IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 2 added
;------------------------------------------
Trigger RansomWealthyWC3
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 3000
          and Trait Wealth < 7
          and HasAncType warcouncil
          and not IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 3 added
;------------------------------------------
Trigger CaptureSettlementWealthyWC
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Wealth < 7
          and HasAncType warcouncil
          and not IsFactionLeader

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy1WC
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Wealth < 7
          and HasAncType warcouncil
          and not IsFactionLeader

    Affects Wealth  20  Chance  100 
    Affects TreasuryWealth  2  Chance  100 
    Affects TreasuryCost  2  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  22  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
;+2000
;------------------------------------------
; if wc has at least adequate wealth and treasury does not need the money
;------------------------------------------
Trigger RansomWealthyWC1T
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 1000
          and Trait Wealth >= 7
          and HasAncType warcouncil
          and not IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

; "< 9" necessarily means that if 9 then v rich donates all to faction (disabled).
;------------------------------------------
Trigger RansomWealthyWC2T
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 2000
          and Trait Wealth >= 7
          and HasAncType warcouncil
          and not IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 2 added
;------------------------------------------
Trigger RansomWealthyWC3T
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition RansomType ransom
          and CharacterIsLocal
          and RansomAmount >= 3000
          and Trait Wealth >= 7
          and HasAncType warcouncil
          and not IsFactionLeader
          and Treasury > 10000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;up to 3 added
;------------------------------------------
Trigger CaptureSettlementWealthyWCT
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Wealth >= 7
          and HasAncType warcouncil
          and not IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy1WCT
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Wealth >= 7
          and HasAncType warcouncil
          and not IsFactionLeader
          and Treasury > 5000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
Trigger SackWealthy2WCT
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Wealth >= 7
          and HasAncType warcouncil
          and not IsFactionLeader
          and Treasury > 10000

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  20  Chance  100 
    Affects Thousands  21  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;------------------------------------------
;Trigger OccupySettlementWealthy
;    WhenToTest OccupySettlement
;
;    Condition CharacterIsLocal
;;          and Trait Wealth < 9
;
;    Affects Wealth  9  Chance  100 
;    Affects TreasuryWealth  1  Chance  100 
;    Affects Hundreds  9  Chance  100 
;
;------------------------------------------
;Trigger SackWealthy2
;    WhenToTest SackSettlement
;
;    Condition CharacterIsLocal
;          and Trait Wealth < 9
;
;    Affects Wealth  9  Chance  100 
;    Affects TreasuryWealth  1  Chance  100 
;    Affects Hundreds  9  Chance  100 
;up to 2 added
;------------------------------------------
;Trigger ExterminateWealthy1
;    WhenToTest ExterminatePopulation
;
;    Condition CharacterIsLocal
;          and Trait Wealth < 9
;
;    Affects Wealth  9  Chance  100 
;    Affects TreasuryWealth  1  Chance  100 
;    Affects Hundreds  9  Chance  100 
;
;------------------------------------------
;Trigger ExterminateWealthy2
;    WhenToTest ExterminatePopulation
;
;    Condition CharacterIsLocal
;          and Trait Wealth < 9
;
;    Affects Wealth  9  Chance  100 
;    Affects TreasuryWealth  1  Chance  100 
;adds up to 2
;------------------------------------------
;------------------------------------------
; Recruiting Costs For Non Warchest holders.---inflation
;------------------------------------------
Trigger RecruitCostAllUnits
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait HasWarchest = 0

    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
;    Affects Cost  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;recruiting costs 100
;------------------------------------------
Trigger RecruitCostAllUnits_Inflation
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait HasWarchest = 0
          and I_EventCounter inflationon = 1

    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;recruiting costs another 100
;------------------------------------------
Trigger RecruitCostHeavy
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitClass heavy
        and CharacterIsLocal
          and Trait HasWarchest = 0

    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
;    Affects Cost  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;recruiting costs 100
;------------------------------------------
Trigger RecruitCostHeavy_Inflation
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitClass heavy
        and CharacterIsLocal
          and Trait HasWarchest = 0
          and I_EventCounter inflationon = 1

    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;recruiting costs another 100
;------------------------------------------
Trigger RecruitCostCavalry
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory cavalry
        and CharacterIsLocal
          and Trait HasWarchest = 0

    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
;    Affects Cost  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;recruiting costs 100
;------------------------------------------
Trigger RecruitCostCavalry_Inflation
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory cavalry
        and CharacterIsLocal
          and Trait HasWarchest = 0
          and I_EventCounter inflationon = 1

    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;recruiting costs another 100
;------------------------------------------
Trigger RecruitCostSiege
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory siege
        and CharacterIsLocal
          and Trait HasWarchest = 0

    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MilitaryExpenses  2  Chance  100 
;    Affects Cost  2  Chance  100 
    Affects MinusHundreds  2  Chance  100 
;recruiting costs 200
;------------------------------------------
Trigger RecruitCostSiege_Inflation
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory siege
        and CharacterIsLocal
          and Trait HasWarchest = 0
          and I_EventCounter inflationon = 1

    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  2  Chance  100 
;recruiting costs another 200
;------------------------------------------
Trigger RecruitCostShip
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory ship
        and CharacterIsLocal
          and Trait HasWarchest = 0

    Affects Poverty  4  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MilitaryExpenses  3  Chance  100 
;    Affects Cost  3  Chance  100 
    Affects MinusHundreds  3  Chance  100 
;recruiting costs 300 i.e 3 extra: 4 total
;------------------------------------------
Trigger RecruitCostShip_Inflation
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory ship
        and CharacterIsLocal
          and Trait HasWarchest = 0
          and I_EventCounter inflationon = 1

    Affects Poverty  4  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  3  Chance  100 
;recruiting costs another 300 i.e 3 extra: 8 total
;------------------------------------------
; Military Expenses For Authorised Generals.
;
; Authorised gens just take the money from the treasury via the settlement instantly
;so wealth effectively unaffected
;------------------------------------------
Trigger RecruitCostAllUnitsME
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1

    Affects MilitaryExpenses  1  Chance  100 
;recruiting costs 100
;------------------------------------------
Trigger RecruitCostHeavyME
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitClass heavy
        and CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1

    Affects MilitaryExpenses  1  Chance  100 
;recruiting costs 100
;------------------------------------------
Trigger RecruitCostCavalryME
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory cavalry
        and CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1

    Affects MilitaryExpenses  1  Chance  100 
;recruiting costs 100
;------------------------------------------
Trigger RecruitCostSiegeME
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory siege
        and CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1

    Affects MilitaryExpenses  2  Chance  100 
;recruiting costs 200
;------------------------------------------
Trigger RecruitCostShipME
    WhenToTest GovernorUnitTrained

    Condition TrainedUnitCategory ship
        and CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1

    Affects MilitaryExpenses  3  Chance  100 
;recruiting costs 300 i.e 3 extra: 4 total
;------------------------------------------
; Mercenary Section
;------------------------------------------
Trigger HireMercenariesCostReset1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait MercHire >= 3

    Affects MercHireReset  4  Chance  100 
    Affects MercHire  1  Chance  100 

;for upto 9. 
;Ensures any remaining value over 9 is there to be duducted next turn
;------------------------------------------
Trigger HireMercenariesCostReset2
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait MercHire >= 3

    Affects MercHireReset  4  Chance  100 
    Affects MercHire  1  Chance  100 

;------------------------------------------
Trigger HireMercenariesCostReset3
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait MercHire >= 2

    Affects MercHireReset  3  Chance  100 
    Affects MercHire  1  Chance  100 

;------------------------------------------
Trigger HireMercenariesCostReset4
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait MercHire >= 1

    Affects MercHireReset  2  Chance  100 
    Affects MercHire  1  Chance  100 

;------------------------------------------
Trigger HireMercenariesCost
    WhenToTest HireMercenaries

    Condition CharacterIsLocal

    Affects MercHire  1  Chance  100 
    Affects Poverty  4  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects Cost  3  Chance  100 
    Affects TreasuryCost  3  Chance  100 
    Affects MilitaryExpenses  3  Chance  100 
;    Affects MinusHundreds  3  Chance  100 
    Affects MinusThousands  20  Chance  100
    Affects Thousands  20  Chance  100
    Affects MinusHundreds  20  Chance  100
    Affects Hundreds  17  Chance  100

;recruiting costs flat 300 per unit. Amount now unchangeable due to script for noble summary.
;------------------------------------------
Trigger HireMercenariesCost_Inflation
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and I_EventCounter inflationon = 1

    Affects Poverty  4  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects Cost  3  Chance  100 
    Affects TreasuryCost  3  Chance  100 
    Affects MinusThousands  20  Chance  100
    Affects Thousands  20  Chance  100
    Affects MinusHundreds  20  Chance  100
    Affects Hundreds  17  Chance  100

;ME extra, Treasury costs, handled in script.
;recruiting costs another flat 300 per unit. Amount now unchangeable due to script for noble summary.
;------------------------------------------
;Trigger DefyTraining
;    WhenToTest GovernorUnitTrained
;
;    Condition not UnitType Peasant Archers
;          and IsGeneral
;          and FactionIsLocal
;
;    Affects Arse  1  Chance  100 
;----------------------------------------------------------------------------------test trigger only !!!!!!!!!!!!!!!!
;------------------------------------------
;Relative Military size to Population size Recruitment Limits
;------------------------------------------
Trigger RecruitmentPopLimitResetGens
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and Trait RecruitmentLimited = 1

    Affects RecruitmentLimited -1  Chance  100

;resets recruitment limited for logens & WCs 22-05-08
;------------------------------------------
Trigger RecruitmentPopLimitGain1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait RecruitmentLimited = 1

    Affects GainRL  1  Chance  100

;gainmessage has been triggered in a prior turn
;------------------------------------------
Trigger RecruitmentPopLimitReset1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait RecruitmentLimited = 1

    Affects RecruitmentLimited -1  Chance  100

;------------------------------------------experiment. cannot reset per turn cos will cause gainmessage per turn.so if 1 then add 1 so 1 =2, to reset at end. can i go past thresh?
Trigger RecruitmentPopLimit1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank military = 6
          and FactionScoreRank regions >= 7

    Affects RecruitmentLimited  1  Chance  100

;------------------------------------------
Trigger RecruitmentPopLimit2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank military = 5
          and FactionScoreRank regions >= 6

    Affects RecruitmentLimited  1  Chance  100

;------------------------------------------
Trigger RecruitmentPopLimit3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank military = 4
          and FactionScoreRank regions >= 5

    Affects RecruitmentLimited  1  Chance  100

;------------------------------------------
Trigger RecruitmentPopLimit4
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank military = 3
          and FactionScoreRank regions >= 4

    Affects RecruitmentLimited  1  Chance  100

;------------------------------------------
Trigger RecruitmentPopLimit5
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank military = 2
          and FactionScoreRank regions >= 3

    Affects RecruitmentLimited  1  Chance  100

;------------------------------------------
Trigger RecruitmentPopLimit6
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank military = 1
          and FactionScoreRank regions >= 2

    Affects RecruitmentLimited  1  Chance  100

;------------------------------------------
Trigger RecruitmentPopLimitGens
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and FactionLeaderTrait RecruitmentLimited = 1
          and Trait RecruitmentLimited < 1

    Affects RecruitmentLimited  1  Chance  100

;Sets recruitment limited for logens & WCs 22-05-08
;------------------------------------------
Trigger RecruitmentPopLimitGain2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait RecruitmentLimited = 1
          and Trait GainRL = 0

    Affects RecruitmentLimited  1  Chance  100
    Affects RecruitmentLimited -1  Chance  100

;if gainmessage has been triggered in a prior turn activate gainmessage (level 2 of Recruitment limited) then put back to level 1
;------------------------------------------
Trigger RecruitmentPopLimitGain3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait RecruitmentLimited = 0
          and Trait GainRL = 1

    Affects RecruitmentLimited  3  Chance  100
    Affects RecruitmentLimited -3  Chance  100

;if gainmessage has been triggered in a prior turn activate gainmessage (level 3 of Recruitment limited: Recruits available) then put back to level 0
;------------------------------------------
Trigger RecruitmentPopLimitReset2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait GainRL = 1

    Affects GainRL -1  Chance  100

;reset gain counter
;------------------------------------------
;
; Faction Zeal SectionFL for global monitering
;
;Faction Zeal will rise and fall with some inbuilt delay after the conditions that cause it come into being.
;This means Faction Zeal will not immediately jump from 1 extreme to another.
;------------------------------------------
Trigger ZealReductionFL1a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions >= 7
          and Trait FactionZeal > 1

    Affects ZealReset  2  Chance  100
    Affects FactionZeal  1  Chance  100

;reduce Zeal by 1 if regions rank is 5th or less and zeal > default (1)
;------------------------------------------
Trigger ZealReductionFL1b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions >= 7
          and Trait FactionZeal < 1

    Affects FactionZeal  1  Chance  100

;increase Zeal by 1 if regions rank is 5th or less and zeal < default (1)
;------------------------------------------
Trigger ZealReductionFL2a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 6
          and FactionScoreRank regions >= 5
          and Trait FactionZeal > 2

    Affects ZealReset  2  Chance  100
    Affects FactionZeal  1  Chance  100

;reduce zeal by 1 if regions rank is 4th but zeal is higher than it should be. Next few trigs are similar for higher and lower.
;------------------------------------------
Trigger ZealReductionFL2b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 6
          and FactionScoreRank regions >= 5
          and Trait FactionZeal < 2

    Affects FactionZeal  1  Chance  100
;------------------------------------------
Trigger ZealReductionFL3a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 4
          and FactionScoreRank regions >= 3
          and Trait FactionZeal > 3

    Affects ZealReset  2  Chance  100
    Affects FactionZeal  1  Chance  100
;------------------------------------------
Trigger ZealReductionFL3b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 4
          and FactionScoreRank regions >= 3
          and Trait FactionZeal < 3

    Affects FactionZeal  1  Chance  100
;------------------------------------------
Trigger ZealReductionFL4a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions = 2
          and Trait FactionZeal > 4

    Affects ZealReset  2  Chance  100
    Affects FactionZeal  1  Chance  100

; (at this level King alone reserves right to knight, hence zeal loss for WarCouncilMember)
; but Heir is still loyal as ever
;------------------------------------------
Trigger ZealReductionFL4b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions = 2
          and Trait FactionZeal < 4

    Affects FactionZeal  1  Chance  100

; (at this level King alone reserves right to knight, hence zeal loss for WarCouncilMember)
; but Heir is still loyal as ever
;------------------------------------------
Trigger ZealReductionFL5
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions = 1
          and Trait FactionZeal < 5

    Affects FactionZeal  1  Chance  100

; (at this level King alone reserves right to knight, hence zeal loss for Heir and WarCouncilMember)
;------------------------------------------fl6a BEWARE. MAY INTRODUCE GAINMESSAGE EVERY TURN USED (USES RESET)
Trigger ZealReductionFL6a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait FactionZeal > 1
          and FactionScorePercent regions <= 25

    Affects ZealReset  2  Chance  100
    Affects FactionZeal  1  Chance  100

;reduces factionzeal if less than 1/4 strength of greatest faction
; two triggers reduce factionzeal by up to 2 points to counteract and reduce over any 1 point increase gained in previous trigs due to high rank
;------------------------------------------fl6b BEWARE. MAY INTRODUCE GAINMESSAGE EVERY TURN USED (USES RESET)
Trigger ZealReductionFL6b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait FactionZeal > 1
          and FactionScorePercent regions <= 25

    Affects ZealReset  2  Chance  100
    Affects FactionZeal  1  Chance  100

;reduces factionzeal loss if less than 1/4 strength of greatest faction
; two triggers reduce factionzeal by up to 2 points to counteract and reduce over any 1 point increase gained in previous trigs due to high rank
;------------------------------------------
;
; General Zeal Section for individual effects
;
;------------------------------------------resets for all generals for if ever a gen loses WC he will need this(though does not currently happen(does now)).
Trigger GeneralZealReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait GeneralZeal > 2

    Affects GeneralZealReset  4  Chance  100
    Affects GeneralZeal  1  Chance  100

;these 3 triggers drop all values to 0
;------------------------------------------
Trigger GeneralZealReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait GeneralZeal > 0

    Affects GeneralZealReset  2  Chance  100
    Affects GeneralZeal  1  Chance  100

;------------------------------------------
Trigger GeneralZealReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait GeneralZeal > 0

    Affects GeneralZealReset  2  Chance  100
    Affects GeneralZeal  1  Chance  100

;------------------------------------------PROBLEM resetting every turn means any gainmessages appear every turn, hence separate traits for FL
Trigger ZealReduction1a
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and not HasAncType warcouncil
          and FactionLeaderTrait FactionZeal = 1

    Affects GeneralZeal  1  Chance  100

; GeneralZeal shows the effect on a character who is affected by factionzeal: not shown on unaffected characters, except the default level(1).
;if Faction Zeal = 1 then default level (1)
;------------------------------------------full is zeal gained by all generals
Trigger ZealReduction2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and not HasAncType warcouncil
;          and FactionScorePercent military > 50
;          and FactionScorePercent military <= 70
;          and FactionScoreRank military = 4
;          and FactionScorePercent military > 50
          and FactionLeaderTrait FactionZeal = 2

    Affects GeneralZeal  2  Chance  100
;------------------------------------------med zeal not affecting WC
Trigger ZealReduction3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and not HasAncType warcouncil
;          and FactionScorePercent military > 70
;          and FactionScorePercent military <= 80
;          and FactionScoreRank military = 3
;          and FactionScorePercent military > 50
          and FactionLeaderTrait FactionZeal = 3

    Affects GeneralZeal  3  Chance  100
;------------------------------------------low zeal not affecting WCMs
Trigger ZealReduction4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
          and not HasAncType warcouncil
;          and FactionScorePercent military > 80
;          and FactionScorePercent military <= 90
;          and FactionScoreRank military = 2
;          and FactionScorePercent military > 50
          and FactionLeaderTrait FactionZeal = 4

    Affects GeneralZeal  4  Chance  100

; (at this level King and heir reserves right to knight) WCMs always unaffected by zeal
;------------------------------------------
Trigger ZealReduction5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
          and not HasAncType warcouncil
;          and FactionScorePercent military > 90
;          and FactionScoreRank military = 1
;          and FactionScorePercent military > 50
          and FactionLeaderTrait FactionZeal = 5

    Affects GeneralZeal  5  Chance  100

; (at this level King alone reserves right to knight(CHANGED to king and heir) in other trait). WCMs always unaffected by zeal
;------------------------------------------
; Stop Start Recruit Section
;------------------------------------------
Trigger StopRecruitReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 1

    Affects StartR  2  Chance  100
    Affects StopR  1  Chance  100

;------------------------------------------
Trigger CrusadeTimerReset1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
; all 9 triggers not required, less would just take more turns to reenable recruitment.
;timer hinges on FL so takes longer to halt recruitment if becomes FL during crusade joining period.
;------------------------------------------
Trigger CrusadeTimerReset2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset4
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset5
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset6
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset7
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset8
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimerReset9
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and Trait ReligiousWarTax < 1
;          and CharacterIsLocal
          and Trait CrusadeTimeOut = 1

    Affects CrusadeTimeOutReset 1  Chance  100

;would need to rewrite this for mods that can alter religion from catholic?
;------------------------------------------
Trigger CrusadeTimer
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait ReligiousWarTax = 1
          and Trait CrusadeTimeOut < 1

    Affects CrusadeTimeOut 1  Chance  100

;------------------------------------------
Trigger CrusadeStopsRecruits
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and FactionLeaderTrait ReligiousWarTax = 1
          and Trait StopR < 1
          and FactionLeaderTrait CrusadeTimeOut = 1
          and PopulationOwnReligion >= 80
          and not AtSea

    Affects StopR 1  Chance  100

;Stops 1 tier of recruitment when crusade on, not joined, join time expired, Settlement Religious.
;------------------------------------------
; (wealth stopr moved to end of traits file)
;------------------------------------------
;Trigger StopRecruitNoblesLevyMaxed
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait StopR = 0
;          and Trait NobleLevy = 9
;
;    Affects StopR  1  Chance  100
;
;------------------------------------------
Trigger StopRecruitFarUnRecReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentUnauthorised >= 1

    Affects RecruitmentUnauthorised -1  Chance  100

;resets all gens descriptive trait
;------------------------------------------
Trigger StopRecruitFarUnRec
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and not IsFactionHeir
          and Trait HasWarchest = 0
          and CharacterIsLocal
          and DistanceCapital > 75
          and Attribute Command <= 2
          and not HasAncType warcouncil
          and FactionLeaderTrait CentralisedPower = 2
          and Trait RecruitmentUnauthorised < 1
          and not Trait JrWarCouncillor = 2

    Affects RecruitmentUnauthorised  1  Chance  100

;descriptive trait
; During Right to knight restricted level only, the general cannot recruit average units either if distance capital >50 (011008, now >75)
;need 3 command or more to attract recruits when far from the capital due to kings restriction of unauthorised armies.
;by default would also need piety if another general was competing to govern
;------------------------------------------
Trigger StopRecruitFar
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and not IsFactionHeir
          and Trait HasWarchest = 0
          and not HasAncType warcouncil
          and CharacterIsLocal
          and Trait StopR = 0
          and DistanceCapital > 75
          and Attribute Command <= 2
          and FactionLeaderTrait CentralisedPower = 2
          and not Trait JrWarCouncillor = 2

    Affects StopR  1  Chance  100

;during right to knight restricted only, cos later levels restrict anyway, despite distance.
;need 4 command or more to attract recruits when far from the capital due to kings restriction of unauthorised armies.
;by default would also need piety if another general was competing to govern
;------------------------------------------
Trigger StopRecruitReligion1New
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and PopulationOwnReligion < 70
          and FactionLeaderTrait FactionZeal <= 1
          and not AtSea

    Affects StopR  1  Chance  100

;affects all
;------------------------------------------
Trigger StopRecruitReligion2New
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and PopulationOwnReligion < 75
          and FactionLeaderTrait FactionZeal = 2
          and not AtSea

    Affects StopR  1  Chance  100

;affects all
;------------------------------------------
Trigger StopRecruitReligion3New
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and PopulationOwnReligion < 80
          and FactionLeaderTrait FactionZeal = 3
          and not AtSea

    Affects StopR  1  Chance  100

;------------------------------------------
Trigger StopRecruitReligion4New
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and PopulationOwnReligion < 85
          and FactionLeaderTrait FactionZeal = 4
          and not AtSea

    Affects StopR  1  Chance  100

;------------------------------------------
Trigger StopRecruitReligion5New
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and PopulationOwnReligion < 90
          and FactionLeaderTrait FactionZeal > 4
          and not AtSea

    Affects StopR  1  Chance  100

;------------------------------------------
;
; Centralisation and Professionalism Section
;
;------------------------------------------Trait CentralisedPower Must not reset at start due to gainmessages
Trigger CentralisationFL1a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions >= 11
          and Trait CentralisedPower = 0

    Affects CentralisedPower  1  Chance  100
; WC always retains ability to attack-----------universal recruitment
;------------------------------------------
Trigger CentralisationFL1b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions >= 11
          and Trait CentralisedPower >= 2

    Affects CentralisedPower -1  Chance  100
; WC always retains ability to attack-----------universal recruitment
;------------------------------------------
Trigger CentralisationFL2a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 10
          and FactionScoreRank regions >= 7
          and Trait CentralisedPower <= 1

    Affects CentralisedPower  1  Chance  100
; WC always retains ability to attack-----------stops recruiting high units
;------------------------------------------
Trigger CentralisationFL2b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 10
          and FactionScoreRank regions >= 7
          and Trait CentralisedPower >= 3

    Affects CentralisedPower -1  Chance  100
; WC always retains ability to attack-----------stops recruiting high units
;------------------------------------------
Trigger CentralisationFL3a
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 6
          and FactionScoreRank regions >= 3
          and Trait CentralisedPower <= 2

    Affects CentralisedPower  1  Chance  100
; FL always retains ability to attack-----------still stops recruiting middle units (and high)
;------------------------------------------
Trigger CentralisationFL3b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 6
          and FactionScoreRank regions >= 3
          and Trait CentralisedPower = 4

    Affects CentralisedPower -1  Chance  100
; FL always retains ability to attack-----------still stops recruiting middle units (and high)
;------------------------------------------
Trigger CentralisationFL4
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and FactionScoreRank regions <= 2
          and Trait CentralisedPower <= 3

    Affects CentralisedPower  1  Chance  100
; FL always retains ability to attack-----------still stops recruiting  middle and high units+ Knights
;------------------------------------------
;
; Centralisation Effects Section (can use a reset and needs to)
;
;------------------------------------------
Trigger StopRecruitCentralisationReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait CentralisedPowerEffect = 1

    Affects CentralisedPowerReset  2  Chance  100
    Affects CentralisedPowerEffect  1  Chance  100

;removes high unit production from logens each turn (is put back next trigger if correct conditions exist)
;also removes CPE from any other gen (i.e.WC and king) who does not/must not require it.
;------------------------------------------
Trigger StopRecruitCentralisation2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 1
          and not HasAncType warchest
          and FactionLeaderTrait CentralisedPower = 2
          and Trait StopR = 0

    Affects StopR  1  Chance  100

; (Logens done because no CPE by default)
; new (can affect king and WCs) - Has Authority, but no Pro Trainers = stop recruitment 
; (Old - WC always retains ability to recruit)-----------stops recruiting LOGEN high units....CentralisationReset trigger should obviate this trigger
; found bug 310809 need and Trait StopR = 0 or will go many points into trait making reset not immediately effective for as many turns as was wrong
;------------------------------------------
Trigger StopRecruitCentralisation3a
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 0
          and Trait StopR = 0
;          and FactionScoreRank regions <= 6
;          and FactionScoreRank regions >= 3
          and FactionLeaderTrait CentralisedPower = 3
          and not Trait JrWarCouncillor = 2

    Affects StopR  1  Chance  100
; (Old - FL always retains ability to recruit)-----------still stops LOGEN recruiting high units, now stops middle too (leaving only militia, peasants and locals)
; New All gens need pro trainers and RecAuth to recruit after cp >= 2
;------------------------------------------
Trigger StopRecruitCentralisation3b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType warchest
          and Trait StopR = 0
;          and FactionScoreRank regions <= 6
;          and FactionScoreRank regions >= 3
          and FactionLeaderTrait CentralisedPower = 3

    Affects StopR  1  Chance  100
; (Old - FL always retains ability to recruit)-----------still stops LOGEN recruiting high units, now stops middle too (leaving only militia, peasants and locals)
; New All gens need pro trainers and RecAuth to recruit after cp >= 2
;------------------------------------------
;Trigger StopRecruitCentralisation4
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and not IsFactionLeader
;          and not IsFactionHeir
;          and Trait StopR = 0
;;          and FactionScoreRank regions <= 2
;          and FactionLeaderTrait CentralisedPower = 4
;
;    Affects StopR  1  Chance  100
; (Old - FL always retains ability to recruit)-----------still stops recruiting LOGEN middle units+ WCM Knights
;------------------------------------------
Trigger StopRecruitCentralisation4a
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 0
          and Trait StopR = 0
;          and FactionScoreRank regions <= 2
          and FactionLeaderTrait CentralisedPower = 4
          and not Trait JrWarCouncillor = 2

    Affects StopR  1  Chance  100
; (Old - FL always retains ability to recruit)-----------still stops recruiting LOGEN middle units+ WCM Knights. As above but stops heir if he does not have WCM
; New All gens need pro trainers and RecAuth to recruit after cp >= 2
;------------------------------------------
Trigger StopRecruitCentralisation4b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType warchest
          and Trait StopR = 0
;          and FactionScoreRank regions <= 2
          and FactionLeaderTrait CentralisedPower = 4

    Affects StopR  1  Chance  100
; (Old - FL always retains ability to recruit)-----------still stops recruiting LOGEN middle units+ WCM Knights. As above but stops heir if he does not have WCM
; New All gens need pro trainers and RecAuth to recruit after cp >= 2
;------------------------------------------
;Trigger StopRecruitPowerful5
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait StopR = 0
;          and FactionScorePercent military > 95
;
;    Affects StopR  1  Chance  100
; FL always retains ability to recruit-----------still stops recruiting LOGEN middle units+ LoCoN Knights+Heir Knights+KING Knights UNUSED
;------------------------------------------
;Recruitment Limited by region/power ratio effects section
;------------------------------------------
Trigger StopRecruitmentLimited1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and FactionLeaderTrait RecruitmentLimited = 1

    Affects StopR  1  Chance  100

;earlier region/power ratio triggers take effect here. Stops 1 tier of recruitment
;------------------------------------------
Trigger StopRecruitmentLimited2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait CentralisedPowerEffect = 1
          and FactionLeaderTrait RecruitmentLimited = 1

    Affects CentralisedPowerReset  2  Chance  100
    Affects CentralisedPowerEffect  1  Chance  100

;earlier region/power ratio triggers take effect here. Stops another tier of recruitment
;------------------------------------------
Trigger StopRecruitmentLimitedJrWC1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitLimit >= 1
          and Trait JrWCOff < 1
          and FactionLeaderTrait RecruitmentLimited = 1

    Affects JrWCOff  1  Chance  100

;earlier region/power ratio triggers take effect here. Stops 1 tier of recruitment
;------------------------------------------
; Orders Section (orders may sometimes be seen by those who they do not apply to too)
;------------------------------------------
Trigger OrdersReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Orders >= 3

    Affects Orders -2  Chance  100

;removes from all gens including a new FL
;------------------------------------------
Trigger OrdersReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Orders >= 2

    Affects Orders -2  Chance  100

;removes from all gens including a new FL
;------------------------------------------
Trigger OrdersReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Orders >= 1

    Affects Orders -1  Chance  100

;removes from all gens including a new FL
;------------------------------------------
Trigger Orders1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
          and FactionLeaderTrait CentralisedPower = 1

    Affects Orders  1  Chance  100
;------------------------------------------
Trigger Orders2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
;          and not HasAncType warcouncil
          and Trait HasWarchest = 0
          and FactionLeaderTrait CentralisedPower = 2

    Affects Orders  2  Chance  100

; orders to all except king, Warchest holders (text is specific)
;------------------------------------------
Trigger Orders3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
;          and not HasAncType warcouncil
;          and Trait HasWarchest = 0
          and FactionLeaderTrait CentralisedPower = 3

    Affects Orders  3  Chance  100

; NEW orders to all but king
;------------------------------------------
Trigger Orders4new
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
          and FactionLeaderTrait CentralisedPower = 4

    Affects Orders  4  Chance  100

; NEW orders to all but king
;------------------------------------------
;Trigger Orders4heir
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and not IsFactionLeader
;          and IsFactionHeir
;          and not HasAncType warcouncil
;          and Trait HasWarchest = 0
;          and FactionLeaderTrait CentralisedPower = 4
;
;    Affects Orders  4  Chance  100
;
; orders to heir when not in WC
;new only goes to non WC, non Warchest Gens
;------------------------------------------
;Trigger Orders4
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and not IsFactionLeader
;          and not IsFactionHeir
;          and FactionLeaderTrait CentralisedPower = 4
;
;    Affects Orders  4  Chance  100
;
; orders to all except heir or king
;------------------------------------------
; Supply System
;------------------------------------------
Trigger SupplyStartAllFactions
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait Supplies < 1

    Affects Supplies  1  Chance  100
    Affects Turnsaway  12  Chance  100

;give supplies at start of turn to all local gens who don't have them. Free of cost as this will mainly be turn 0 characters.
;rest of triggers only reduce in enemy and home land and only add in home settlement, not land. Removed  and CharacterIsLocal
;------------------------------------------
Trigger Poor_Logistics
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not EndedInSettlement
          and InEnemyLands
          and Trait Supplies = 6
          and Trait PoorLogistics < 1

    Affects PoorLogistics  1  Chance  100

;only adds this if currently does not have and allowed supplies to run out last turn. does not trigger in ownlands. does not affect good logistician. Extra Done 5 to 6.
;this trigger must always come before the supply processing code.
;------------------------------------------
;Trigger MerchantSupplies
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait Supplies > 1
;          and I_CharacterTypeNearCharacterType byzantium merchant 1 byzantium general
;
;    Affects SuppliesAdded  2  Chance  100
;    Affects Supplies  1  Chance  100
;
;attempt at supply by merchant. left in for poss future.
;------------------------------------------
Trigger CapturedSuppliesSettlementNoExtra
    WhenToTest GeneralCaptureSettlement

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

; for capturing settlement. Has No Emergency Supplies Jump Level
;------------------------------------------
Trigger CapturedSuppliesSettlement25
    WhenToTest GeneralCaptureSettlement

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies > 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

; for capturing settlement 25%. May get 25% more from postbattle trigs.
;------------------------------------------
Trigger CapturedSuppliesNoExtra
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and PercentageEnemyKilled > 25
          and BattleOdds < 2
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;supplies won after a battle adds 1/4 back to stockif room and if 25% enemy killed (so no reward for retreating enemy). Has No Emergency Supplies Jump Level
;enemy must be greater then half players army
;------------------------------------------
Trigger CapturedSupplies
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and PercentageEnemyKilled > 25
          and BattleOdds < 2
          and Trait Supplies > 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;supplies won after a battle adds 1/4 back to stockif room and if 25% enemy killed (so no reward for retreating enemy)
;------------------------------------------
Trigger CapturedSupplies2
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and PercentageEnemyKilled > 40
          and BattleOdds < 2
          and Trait Supplies > 1
          and not I_ConflictType Siege
          and PercentageUnitAttribute general_unit < 7

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;supplies won after a battle adds another 1/4 back to stock if room and 40% enemy killed. Not siege
;------------------------------------------
Trigger EnemyCapturesSupplies
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and not WonBattle
          and PercentageOfArmyKilled > 50
          and Trait Supplies <= 5

    Affects Supplies  1  Chance  100

;supplies lost after a battle 1/4 and 50% army lost. Wont punish a clever withdrawal, which would keep supplies. upto 25% supplydrop. Changed 4 to 5 Extra done.
;------------------------------------------
Trigger EnemyCapturesSupplies2
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and not WonBattle
          and PercentageOfArmyKilled > 50
          and Trait Supplies <= 5

    Affects Supplies  1  Chance  50

;supplies lost after a battle 1/4 and 50% army lost. Wont punish a clever withdrawal, which would keep supplies.upto 50% supplydrop. chance 50. 4 to 5 Extra Done
;------------------------------------------
Trigger EnemyCapturesSupplies3
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and not WonBattle
          and PercentageOfArmyKilled > 50
          and Trait Supplies <= 5

    Affects Supplies  1  Chance  50

;supplies lost after a battle 1/4 and 50% army lost. Wont punish a clever withdrawal, which would keep supplies.upto 75% supplydrop. chance 50. 4 to 5 Extra Done
;------------------------------------------
Trigger EnemyCapturesSupplies4
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and not WonBattle
          and PercentageOfArmyKilled > 50
          and Trait Supplies <= 5

    Affects Supplies  1  Chance  50

;supplies lost after a battle 1/4 and 50% army lost. Wont punish a clever withdrawal, which would keep supplies.upto 100% supplydrop. chance 50. 4 to 5 Extra Done
;------------------------------------------
; SupplyWagons
;------------------------------------------
Trigger SupplyWagonsReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType supplywagon
          and Trait SupplyWagon = 1

    Affects SupplyWagonReset  2  Chance  100
    Affects SupplyWagon  1  Chance  100
;------------------------------------------
Trigger SupplyWagonsReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType supplywagon
          and Trait SupplyWagon = 2

    Affects SupplyWagonReset  3  Chance  100
    Affects SupplyWagon  1  Chance  100
;------------------------------------------
Trigger SupplyWagonsReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType supplywagon
          and Trait SupplyWagon = 3

    Affects SupplyWagonReset  4  Chance  100
    Affects SupplyWagon  1  Chance  100
;------------------------------------------
Trigger SupplyWagonsReset4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType supplywagon
          and Trait SupplyWagon = 4

    Affects SupplyWagonReset  5  Chance  100
    Affects SupplyWagon  1  Chance  100
;------------------------------------------
Trigger SupplyWagonsReset5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not HasAncType supplywagon
          and Trait SupplyWagon = 5

    Affects SupplyWagonReset  6  Chance  100
    Affects SupplyWagon  1  Chance  100
;------------------------------------------
; Initialise Supply Wagon
;------------------------------------------
Trigger SupplyWagonsInitialise1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon = 0

    Affects SupplyWagon  1  Chance  100
;------------------------------------------
Trigger SupplyWagonsInitialise2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon = 0

    Affects SupplyWagon  1  Chance  100
;------------------------------------------
; Transfer st to SupplyWagon
;------------------------------------------
Trigger stToSWTransfer1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon = 1
          and I_EventCounter st = 1

    Affects SupplyWagon  1  Chance  100
;------------------------------------------
Trigger stToSWTransfer2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon = 1
          and I_EventCounter st = 2

    Affects SupplyWagon  2  Chance  100
;------------------------------------------
Trigger stToSWTransfer3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon = 1
          and I_EventCounter st = 3

    Affects SupplyWagon  3  Chance  100
;------------------------------------------
Trigger stToSWTransfer4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon = 1
          and I_EventCounter st = 4

    Affects SupplyWagon  4  Chance  100
;------------------------------------------
; Transfer Supplies from SupplyWagon to Gen
;------------------------------------------
Trigger SWtoGenTransferJump
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon > 1
          and Trait Supplies = 6

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;------------------------------------------
Trigger SWtoGenTransfer1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon > 1
          and Trait Supplies > 1

    Affects SupplyWagonReset  2  Chance  100
    Affects SupplyWagon  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;------------------------------------------
Trigger SWtoGenTransfer2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon > 1
          and Trait Supplies > 1

    Affects SupplyWagonReset  2  Chance  100
    Affects SupplyWagon  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;------------------------------------------
Trigger SWtoGenTransfer3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon > 1
          and Trait Supplies > 1

    Affects SupplyWagonReset  2  Chance  100
    Affects SupplyWagon  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;------------------------------------------
Trigger SWtoGenTransfer4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and HasAncType supplywagon
          and Trait SupplyWagon > 1
          and Trait Supplies > 1

    Affects SupplyWagonReset  2  Chance  100
    Affects SupplyWagon  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;------------------------------------------
; New Region Reset for ForageIncrement and TIF
;covers new regions and supply ships reset
;------------------------------------------
; Implement "OR" to save triggers for timeinregion and armysize 0
; (Armysize currently is set to 1 if 0
; so the army size part is redundant, but may be useful in future.)
;------------------------------------------
Trigger CheckForNewRegionAnd2ndGensReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
;wealthcheck is a multipurpose check trait
;------------------------------------------
Trigger CheckForNewRegionAnd2ndGensSet1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and TimeInRegion = 1

    Affects WealthCheck  1  Chance  100
;------------------------------------------
Trigger CheckForNewRegionAnd2ndGensSet2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ArmySize = 0
          and Trait WealthCheck = 0

    Affects WealthCheck  1  Chance  100
;------------------------------------------
Trigger ForageSizeResetChip4NewRegion
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait ForageIncrement >= 4

    Affects ForageIncrementReset  5  Chance  100
    Affects ForageIncrement  1  Chance  100
; -4
;------------------------------------------
Trigger ForageSizeResetChip3NewRegion
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait ForageIncrement >= 3

    Affects ForageIncrementReset  4  Chance  100
    Affects ForageIncrement  1  Chance  100
; -3
;------------------------------------------
Trigger ForageSizeResetChip2NewRegion
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait ForageIncrement >= 2

    Affects ForageIncrementReset  3  Chance  100
    Affects ForageIncrement  1  Chance  100
; -2
;------------------------------------------
Trigger ForageSizeResetChip1NewRegion
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait ForageIncrement >= 1

    Affects ForageIncrementReset  2  Chance  100
    Affects ForageIncrement  1  Chance  100
; -1
;------------------------------------------
Trigger CountResetNewRegion1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait TimeInField = 1

    Affects TIFReset 10  Chance  100
    Affects TimeInField  9  Chance  100

; reset TIF from values of 1 or 3 or 2 ( 4 resets itself after decreasing supplies) to Zero. If MOVED TO NEW REGION May need "timeinregion=0" instead of 1
;------------------------------------------
Trigger CountResetNewRegion2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait TimeInField = 3

    Affects TIFReset 10  Chance  100
    Affects TimeInField  7  Chance  100

; reset TIF from values of 1 or 3 or 2 (4 resets itself after supply decrease) to Zero. If MOVED TO NEW REGION
;------------------------------------------
Trigger CountResetNewRegion3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait TimeInField = 2

    Affects TIFReset 10  Chance  100
    Affects TimeInField  8  Chance  100

; reset TIF if on 2 in ownland then move to enemyland, else goes to 3 next turn. .If MOVED TO NEW REGION.
;------------------------------------------
Trigger CountResetNewRegion4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait TimeInField = 4


    Affects TIFReset 10  Chance  100
    Affects TimeInField  6  Chance  100

; reset TIF if on 4 because both enemy and home region army were set to 4 when they triggered their supply decrease
;------------------------------------------
Trigger CheckForNewRegionAnd2ndGensReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
;------------------------------------------
; ForageIncrement Prior to FieldCount
;------------------------------------------
Trigger ForageIncSize1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait ForageIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit >= 40
          and Trait ArmySize = 1
          and Trait TimeInField <= 3

    Affects ForageIncrement  2  Chance  100

; should ideally increment 1, but such a slow increment is bad for gameplay. Made 1/8 army same as 1/4.
; and Trait TimeInField >= 1 allows fresh forage to show without any increment for a turn
; before showing with a forageinc next turn
;------------------------------------------
Trigger ForageIncSize2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait ForageIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit >= 20
;          and PercentageUnitAttribute general_unit < 40
          and Trait ArmySize = 2
          and Trait TimeInField <= 3

    Affects ForageIncrement  2  Chance  100

;------------------------------------------
Trigger ForageIncSize4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait ForageIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit >= 10
;          and PercentageUnitAttribute general_unit < 20
          and Trait ArmySize = 3
          and Trait TimeInField <= 3

    Affects ForageIncrement  4  Chance  100

;------------------------------------------
Trigger ForageIncSize8
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait ForageIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit < 10
          and Trait ArmySize = 4
          and Trait TimeInField <= 3

    Affects ForageIncrement  8  Chance  100

;------------------------------------------
; Out of forage Reset
;------------------------------------------
Trigger CountResetAnyRegion4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TimeInField = 4
          and not EndedInEnemyZOC
          and not Trait Supplies = 6

    Affects TIFReset 10  Chance  100
    Affects TimeInField  6  Chance  100

; reset TIF if on 4 because both enemy and home region army were set to 4 when they triggered their supply decrease-OLD. NEW-Region Reset.ZOC triggers only on 1st contact
;------------------------------------------
Trigger FieldCountSetDefaultLvlFresh
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 0
          and not Trait ArmySize = 0
          and Trait ForageIncrement < 8

    Affects TimeInField  1  Chance  100

; Sets forage to fresh if none displayed. Without this, nothing displays in foraging until forageincrement = 8
; leaves TIF as 0 for any 2nd general
;------------------------------------------
Trigger FieldCountSetDefaultLvlWide
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 0
          and Trait ArmySize = 4
          and Trait ForageIncrement = 8

    Affects TimeInField  1  Chance  100

; Sets forage to wide (with following trigger) if none displayed & gen is 1st turn out with full army size. 
; Without this, nothing displays in foraging until forageincrement = 8
; leaves TIF as 0 for any 2nd general
;------------------------------------------
Trigger FieldCount
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField <= 3
          and Trait ForageIncrement = 8

    Affects TimeInField  1  Chance  100

; Can only be 1 to 4. Increments each turn.
;------------------------------------------
; Forage inc reset. Disable some triggers if total reset not required.
; resets when 8 reached or ended in enemy zoc
;------------------------------------------
Trigger ForageSize8WealthCheckReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger ForageSize8Chip8
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ForageIncrement = 8

    Affects WealthCheck  1  Chance  100
    Affects ForageIncrementReset  9  Chance  100
    Affects ForageIncrement  1  Chance  100
; -8
;------------------------------------------
Trigger ForageInc_ZOC_Reset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and EndedInEnemyZOC
          and Trait WealthCheck < 1

    Affects WealthCheck  1  Chance  100

; also set wealthcheck to reset forageincrement if in ZOC
; regardless of current forage range or increment
;------------------------------------------
Trigger NoForage_ForageInc_Reset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait TimeInField = 4
          and Trait WealthCheck < 1

    Affects WealthCheck  1  Chance  100

; if no forage then remove forage increments too.
; if this trigger removed FI would wrap around
;e.g. If full army got No Forage/ForInc 7(1/8 left), would become Fresh forage/ForInc 7+8-8=7 again
;i.e. (expanded into next forage level). Which is only ok between fresh and scarce.
;------------------------------------------
Trigger ForageSize8ResetChip4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ForageIncrement >= 4
          and Trait WealthCheck = 1

    Affects ForageIncrementReset  5  Chance  100
    Affects ForageIncrement  1  Chance  100
; -4
;------------------------------------------
Trigger ForageSize8ResetChip3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ForageIncrement >= 3
          and Trait WealthCheck = 1

    Affects ForageIncrementReset  4  Chance  100
    Affects ForageIncrement  1  Chance  100
; -3
;------------------------------------------
Trigger ForageSize8ResetChip2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ForageIncrement >= 2
          and Trait WealthCheck = 1

    Affects ForageIncrementReset  3  Chance  100
    Affects ForageIncrement  1  Chance  100
; -2
;------------------------------------------
Trigger ForageSize8ResetChip1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait ForageIncrement >= 1
          and Trait WealthCheck = 1

    Affects ForageIncrementReset  2  Chance  100
    Affects ForageIncrement  1  Chance  100
; -1
;------------------------------------------
;Trigger ForageSize8PostChipSet8
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait ForageIncrement = 0
;          and Trait WealthCheck = 1
;
;    Affects WealthCheck -1  Chance  100
;    Affects ForageIncrement  8  Chance  100
;;+8 (mistake I think)
; sets all forageinc to 8 (with prior triggers) if needed subsequently
;------------------------------------------
Trigger ForageSize8WealthCheckReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger FieldCountZOC2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField <= 3
          and EndedInEnemyZOC

    Affects TimeInField  1  Chance  100

; increases fieldcount to 4 when in Enemy ZOC to display 4th level which is no foraging. part1
;------------------------------------------
Trigger FieldCountZOC3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField <= 3
          and EndedInEnemyZOC

    Affects TimeInField  1  Chance  100

; increases fieldcount to 4 when in Enemy ZOC. part2
;------------------------------------------
Trigger FieldCountZOC4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField <= 3
          and EndedInEnemyZOC

    Affects TimeInField  1  Chance  100

; increases fieldcount to 4 when in Enemy ZOC. part3
;------------------------------------------
Trigger SupplyWealthThouToHun_SGENE
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7
          and Trait Thousands >= 1
          and Trait Hundreds < 6


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds for 1600
;------------------------------------------
Trigger SupplyWealthCheck_SGENEReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGENE1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects WealthCheck  1  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGENE2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects WealthCheck -1  Chance  100
    Affects Wealth  16  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGENE3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  16  Chance  100
;------------------------------------------
Trigger SupplyGetEncampedNoExtra1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;jumps to level 5 (emergency) if not good log so does not get emergency next trig.
;------------------------------------------
Trigger SupplyGetEncamped
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait Supplies > 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusThousands  1  Chance  100
    Affects MinusHundreds  6  Chance  100

;In camp, with own 50% religious land and with supplies reduced. Resupply 1/4
;min wealth requirement for any supplies is "poor" See sheet for method to avoid debt.
;1600
;------------------------------------------
Trigger SupplyShipReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SuppliedBySea > 0

    Affects SuppliedBySea -1  Chance  100

;keeps this trait set at 0 unless it fulfills trigger each turn. Fixed - moved this trigger from below supplyship1(suppliedbysea wasnt showing)(added"Trait"to suppliedbysea)
;------------------------------------------
Trigger SupplyShipNoExtra
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait PoorLogistics < 2
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;In a ship for 1 turn. Resupply 1/4. Jump level if no emergency supplies. No Extra Done.
;------------------------------------------
Trigger SupplyShip1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies > 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SuppliedBySea  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusHundreds  16  Chance  100

;In a ship for 1 turn. Resupply 1/4. 1600
;------------------------------------------
Trigger SupplyWealthThouToHun_SGENEI
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7
          and Trait Thousands >= 1
          and Trait Hundreds < 2

    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor & not enough in hundreds column, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthCheckReset_SGENEI
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 3200
;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGENEI_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGENEI_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  32  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGENEI_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  32  Chance  100

;3 trigs check if can afford 3200
;------------------------------------------
Trigger SupplyGetEncampedNoExtra_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2
;          and Trait Wealth >= 6
          and Trait WealthCheck = 1
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
;jumps to level 5 (emergency) if not good log so does not get emergency next trig.
;3200
;------------------------------------------
Trigger SupplyGetEncamped_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait Supplies > 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  32  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  5  Chance  100
    Affects MinusThousands  3  Chance  100
    Affects MinusHundreds  2  Chance  100
;3200
;------------------------------------------
Trigger SupplyShipNoExtra_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait PoorLogistics < 2
;          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;In a ship for 1 turn. Resupply 1/4. Jump level if no emergency supplies. No Extra Done.
;3200
;------------------------------------------
Trigger SupplyShip1_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies > 1
;          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliedBySea  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  32  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  5  Chance  100
    Affects MinusHundreds  32  Chance  100

;3200
;keep to less than 11 affects. 3200. note: and Trait Wealth >= 7
;------------------------------------------
; Settlement Resupply
;------------------------------------------
Trigger SupplyWealthThouToHun1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 8


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;bring up 3 times in case of many minushundreds
;------------------------------------------
Trigger SupplyWealthThouToHun2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 8


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthThouToHun3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 8


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthCheckReset_SGNE
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 800
;------------------------------------------
Trigger SupplyWealthCheck_SGNE_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGNE_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  8  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGNE_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  8  Chance  100

;3 trigs check if can afford 800
;------------------------------------------
Trigger SupplyGetNoExtra
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait PoorLogistics < 2
;          and Trait Wealth >= 6
;          and Trait Hundreds >= 8
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;In settlement, with own 50% religious land and with supplies reduced. Resupply 1/4. NoExtra Done
;knocks back to level 5 for gens who don't get level 5(skips a level) (5 is emergency, 6 is out) but, next trigger knocks down from emergency supplies.800
;------------------------------------------
Trigger SupplyGet
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies > 1
;          and Trait Wealth >= 6
;          and Trait Hundreds >= 8
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  8  Chance  100
    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  8  Chance  100
    Affects MinusHundreds  8  Chance  100

;In settlement, with own 50% religious land and with supplies reduced. Resupply 1/4
;min wealth requirement for any supplies is "poor"
;thousands requirement = huns must not be negative and thous must not be negative, but can go only 100 in debt with supplies.800
;------------------------------------------
Trigger SupplyWealthThouToHunSGNEI
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 6


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds 1600
;------------------------------------------
Trigger SupplyWealthCheckReset_SGNEI
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 1600
;------------------------------------------
Trigger SupplyWealthCheck_SGNEI_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGNEI_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  16  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGNEI_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  16  Chance  100

;3 trigs check if can afford 1600
;------------------------------------------
Trigger SupplyGetNoExtra_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait PoorLogistics < 2
          and I_EventCounter inflationon = 1
;          and Trait Wealth >= 6
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;In settlement, with own 50% religious land and with supplies reduced. Resupply 1/4. NoExtra Done
;knocks back to level 5 for gens who don't get level 5(skips a level) (5 is emergency, 6 is out) but, next trigger knocks down from emergency supplies.
;1600
;------------------------------------------
Trigger SupplyGet_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies > 1
          and I_EventCounter inflationon = 1
;          and Trait Wealth >= 6
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusThousands  1  Chance  100
    Affects MinusHundreds  6  Chance  100
;1600
;------------------------------------------
Trigger SupplyWealthThouToHun_SG2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 8


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds to cope with 800 in following trigger
;------------------------------------------
Trigger SupplyWealthCheckReset_SG2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 800
;------------------------------------------
Trigger SupplyWealthCheck_SG2_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG2_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  8  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG2_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  8  Chance  100

;3 trigs check if can afford 800
;------------------------------------------
Trigger SupplyGet2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies > 1
          and not Trait PoorLogistics = 1
          and I_EventCounter inflationon = 0
;          and Trait Wealth >= 6
;          and Trait Hundreds >= 8
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  8  Chance  100
    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  8  Chance  100
    Affects MinusHundreds  8  Chance  100

;In settlement, with own 50% religious land and with supplies reduced. Resupply another 1/4 if needed to fully a half, if gen is not poor logistician.
;800
;------------------------------------------
Trigger SupplyWealthThouToHun_SG2I
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 6


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthCheckReset_SG2I
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 1600
;------------------------------------------
Trigger SupplyWealthCheck_SG2I_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG2I_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  16  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG2I_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  16  Chance  100

;3 trigs check if can afford 1600
;------------------------------------------
Trigger SupplyGet2_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies > 1
          and not Trait PoorLogistics = 1
          and I_EventCounter inflationon = 1
;          and Trait Wealth >= 6
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusThousands  1  Chance  100
    Affects MinusHundreds  6  Chance  100

;1600
;------------------------------------------
Trigger SupplyShip2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies > 1
          and not Trait PoorLogistics = 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SuppliedBySea  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusHundreds  16  Chance  100

;In a ship for 1 turn. Resupply another 1/4 if needed to replenish a half in total with these 2 triggers (ss1+ss2)
;1600 now shares same wealth check as land supplies above. Do not move these triggers around.
;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SG3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 8


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthCheckReset_SG3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 800
;------------------------------------------
Trigger SupplyWealthCheck_SG3_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG3_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  8  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG3_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  8  Chance  100

;3 trigs check if can afford 800
;------------------------------------------
Trigger SupplyGet3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies > 1
          and Trait PoorLogistics > 1
;          and Trait Wealth >= 6
;          and Trait Hundreds >= 8
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  8  Chance  100
    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  8  Chance  100
    Affects MinusHundreds  8  Chance  100

;In settlement, with own 50% religious land and with supplies reduced. Resupply another 1/4 if needed to fully a 3/4, if gen is good logistician.
;800
;------------------------------------------
;Trigger SupplyGet4_LowReligion
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and EndedInSettlement
;          and PopulationOwnReligion <= 50
;          and CharacterIsLocal
;          and Trait Supplies > 1
;          and Trait PoorLogistics > 1
;;          and Trait Wealth >= 6
;;          and Trait Hundreds >= 8
;          and I_EventCounter inflationon = 0
;;          and Trait Debt < 1
;          and Trait WealthCheck = 1
;
;    Affects SuppliesAdded  2  Chance  100
;    Affects Supplies  1  Chance  100
;    Affects SupplyCost  1  Chance  100
;    Affects Cost  8  Chance  100
;    Affects Poverty  9  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost  8  Chance  100
;    Affects MinusHundreds  8  Chance  100
;
;;Old method: good logistician can get slightly supplied in a foreign settlement. used ";". 08-08-08 CHANGED to <= 50
;;In settlement, with supplies reduced. Resupply another 1/4 if needed to full, if gen is good logistician.
;;800  shares wealthchecks with SG3. Disabled as gens can now resupply subfractions sans religious support.
;------------------------------------------
Trigger SupplyWealthThouToHun_SG3I
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 6


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthCheckReset_SG3I
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100
; for 1600
;------------------------------------------
Trigger SupplyWealthCheck_SG3I_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects WealthCheck  1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG3I_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects Wealth  16  Chance  100
    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SG3I_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  16  Chance  100

;3 trigs check if can afford 1600
;------------------------------------------
Trigger SupplyGet3_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
          and Trait Supplies > 1
          and Trait PoorLogistics > 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusThousands  1  Chance  100
    Affects MinusHundreds  6  Chance  100
1600
;------------------------------------------
;Trigger SupplyGet4_Inflation
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and EndedInSettlement
;          and PopulationOwnReligion <= 50
;          and CharacterIsLocal
;          and Trait Supplies > 1
;          and Trait PoorLogistics > 1
;;          and Trait Wealth >= 6
;; would need wealth check here
;          and I_EventCounter inflationon = 1
;;          and Trait Debt < 1
;          and Trait WealthCheck = 1
;
;    Affects SuppliesAdded  2  Chance  100
;    Affects Supplies  1  Chance  100
;    Affects SupplyCost  1  Chance  100
;    Affects Cost  16  Chance  100
;    Affects Poverty  17  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryWealth  1  Chance  100
;    Affects TreasuryCost  7  Chance  100
;    Affects MinusThousands  1  Chance  100
;    Affects MinusHundreds  6  Chance  100
;
;;Old method: good logistician can get slightly supplied in a foreign settlement. used ";". 08-08-08 CHANGED to <= 50
;;In settlement, with supplies reduced. Resupply another 1/4 if needed to full, if gen is good logistician.
;;1600
;; shares same wealth check as previous SG2 triggers because wont both go off.
;; disabled as gens can still buy supply fractions regardless of religion
;------------------------------------------
; Ship supply section 2 (other section mixed into encamped to share same wealth checks)
;------------------------------------------
Trigger SupplyShip3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies > 1
          and Trait PoorLogistics > 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SuppliedBySea  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusHundreds  16  Chance  100

;In a ship for 1 turn. Resupply another 1/4 if needed to replenish a 3/4 in total with these 2 good logistics triggers
;1600
;------------------------------------------
Trigger SupplyWealthThouToHun_SS2I
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 2


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyShip2_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies > 1
          and not Trait PoorLogistics = 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliedBySea  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  32  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  5  Chance  100
    Affects MinusHundreds  32  Chance  100

;In a ship for 1 turn. Resupply another 1/4 if needed to replenish a half in total with these 2 triggers, only 2nd 1/4 if poor logistician
;3200
;------------------------------------------
Trigger SupplyWealthThouToHun_SS3I
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 2


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyWealthCheck_SS3IReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SS3I_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects WealthCheck  1  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SS3I_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects WealthCheck -1  Chance  100
    Affects Wealth  32  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SS3I_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  32  Chance  100
;------------------------------------------
Trigger SupplyShip3_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
          and Trait Supplies > 1
          and Trait PoorLogistics > 1
;          and Trait Wealth >= 6
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SuppliedBySea  1  Chance  100
    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  32  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  5  Chance  100
    Affects MinusHundreds  32  Chance  100
;3200
;------------------------------------------
;Trigger SupplyWealthThouToHun_SS4
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait Wealth >= 6
;          and Trait Thousands >= 1
;          and Trait Hundreds < 6
;
;
;    Affects MinusThousands  1  Chance  100
;    Affects Hundreds  10  Chance  100
;
;at least poor, transfer 1 Thou to Hundreds..........SS4 disabled. Now only 3/4 max resupply/turn. If reenabled do wealthchecks.
;------------------------------------------
;Trigger SupplyShip4
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and AtSea
;          and CharacterIsLocal
;          and Trait Supplies > 1
;          and Trait PoorLogistics > 1
;;          and Trait Wealth >= 6
;          and I_EventCounter inflationon = 0
;;          and Trait Debt < 1
;          and Trait WealthCheck = 1
;
;    Affects SuppliesAdded  2  Chance  100
;    Affects Supplies  1  Chance  100
;    Affects SuppliedBySea  1  Chance  100
;    Affects SupplyCost  1  Chance  100
;    Affects Cost  16  Chance  100
;    Affects Poverty  17  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryWealth  1  Chance  100
;    Affects TreasuryCost  7  Chance  100
;    Affects MinusHundreds  16  Chance  100
;
;In a ship for 1 turn. Resupply another 1/4 if needed to replenish 4/4 in total with these 2 good logistics triggers
;1600
;------------------------------------------
;Trigger SupplyShip4_Inflation
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and AtSea
;          and CharacterIsLocal
;          and Trait Supplies > 1
;          and Trait PoorLogistics > 1
;;          and Trait Wealth >= 6
;          and I_EventCounter inflationon = 1
;;          and Trait Debt < 1
;          and Trait WealthCheck = 1
;
;    Affects SuppliedBySea  1  Chance  100
;    Affects SuppliesAdded  2  Chance  100
;    Affects Supplies  1  Chance  100
;    Affects SupplyCost  1  Chance  100
;    Affects Cost  32  Chance  100
;    Affects Poverty  33  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryWealth  3  Chance  100
;    Affects TreasuryCost  5  Chance  100
;    Affects MinusHundreds  32  Chance  100
;3200
;------------------------------------------
; Supply Wagon Replenishment (after settlement and ship, if money still available)
; Buy in Settlements
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGSWS_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects WealthCheck  1  Chance  100
    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGSWS_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects WealthCheck -1  Chance  100
    Affects Wealth  8  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGSWS_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  8  Chance  100
;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGSWS
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 8


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyGetSupplyWagonSettlement
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
;          and Trait Wealth >= 6
;          and Trait Hundreds >= 8
          and HasAncType supplywagon
          and Trait SupplyWagon < 5
          and Trait SupplyCost = 0
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SupplyWagon  1  Chance  100
    Affects Poverty  9  Chance  100
    Affects Wealth  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  8  Chance  100
    Affects TreasuryCost  8  Chance  100
    Affects MinusHundreds  8  Chance  100

;In settlement, with 50% own religion support and with supplywagon reduced. Resupply 1/4 if no General's supplies purchased this turn.
;800
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSIReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGSWSI_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects WealthCheck  1  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSI_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects WealthCheck -1  Chance  100
    Affects Wealth  16  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSI_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  16  Chance  100
;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGSWSI
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 6


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyGetSupplyWagonSettlement_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and PopulationOwnReligion > 50
          and CharacterIsLocal
;          and Trait Wealth >= 6
          and HasAncType supplywagon
          and Trait SupplyWagon < 5
          and Trait SupplyCost < 1
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SupplyWagon  1  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusThousands  1  Chance  100
    Affects MinusHundreds  6  Chance  100

;In settlement, with 50% own religion support and with supplywagon reduced. Resupply 1/4 if no General's supplies purchased this turn.
;1600
;------------------------------------------
; Replenish SupplyWagon in Supply Ships
;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGSWSea
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 6


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyGetSupplyWagonSea
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
;          and Trait Wealth >= 6
          and HasAncType supplywagon
          and Trait SupplyWagon < 5
          and Trait SupplyCost = 0
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SupplyWagon  1  Chance  100
    Affects Poverty  17  Chance  100
    Affects Wealth  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  16  Chance  100
    Affects TreasuryWealth  1  Chance  100
    Affects TreasuryCost  7  Chance  100
    Affects MinusThousands  1  Chance  100
    Affects MinusHundreds  6  Chance  100

;In ship with supplywagon reduced. Resupply 1/4 if no General's supplies purchased this turn.
;1600
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSeaIReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100

;------------------------------------------
Trigger SupplyWealthCheck_SGSWSeaI_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 7

    Affects WealthCheck  1  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSeaI_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Wealth <= 6

    Affects WealthCheck -1  Chance  100
    Affects Wealth  32  Chance  100
;------------------------------------------
Trigger SupplyWealthCheck_SGSWSeaI_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait WealthCheck = 1

    Affects Wealth  32  Chance  100
;------------------------------------------
Trigger SupplyWealthCheckThouToHun_SGSWSeaI
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth >= 6
          and Trait Thousands >= 1
          and Trait Hundreds < 2


    Affects MinusThousands  1  Chance  100
    Affects Hundreds  10  Chance  100

;at least poor, transfer 1 Thou to Hundreds
;------------------------------------------
Trigger SupplyGetSupplyWagonSea_Inflation
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and AtSea
          and CharacterIsLocal
;          and Trait Wealth >= 6
          and HasAncType supplywagon
          and Trait SupplyWagon < 5
          and Trait SupplyCost < 1
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait WealthCheck = 1

    Affects SupplyWagon  1  Chance  100
    Affects SupplyCost  1  Chance  100
    Affects Cost  32  Chance  100
    Affects Poverty  33  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  5  Chance  100
    Affects MinusThousands  3  Chance  100
    Affects MinusHundreds  2  Chance  100
;3200
;------------------------------------------
; Purchase SupplyIncrement when in Settlement, ship or Encamped. Up to 7/8ths of a supply 1/4. should not need 8.
; Subfractions DO allow purchases to push into poor level, but only when starting with adequate or more.
;
; to do, add religion resriction or remove whole resupply in enemy religion from 1/4s section
; so only subfractions are immune to religion and max purchase would be 7/32ths
;
;
;------------------------------------------
Trigger SupplyIncCostReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait SupplyIncrementCost >= 4

    Affects SupplyIncrementCostReset  5  Chance  100
    Affects SupplyIncrementCost  1  Chance  100

;------------------------------------------
Trigger SupplyIncCostReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait SupplyIncrementCost >= 3

    Affects SupplyIncrementCostReset  4  Chance  100
    Affects SupplyIncrementCost  1  Chance  100

;------------------------------------------
Trigger SupplyIncCostReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait SupplyIncrementCost >= 2

    Affects SupplyIncrementCostReset  3  Chance  100
    Affects SupplyIncrementCost  1  Chance  100

;------------------------------------------
Trigger SupplyIncCostReset4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait SupplyIncrementCost >= 1

    Affects SupplyIncrementCostReset  2  Chance  100
    Affects SupplyIncrementCost  1  Chance  100

;------------------------------------------
Trigger SupplyIncGet_city_NoExtra0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement < 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;NoExtra triggers move supplies from out to 100% rather than to Emergency for Good Logisticians.
;------------------------------------------
Trigger SupplyIncGet_city_0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement < 1
          and Trait Supplies > 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyIncrement  7  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement adds a supply 1/4 then sets the increment to 1/8 remaining.
;------------------------------------------
Trigger SupplyIncGet_city_InflationNoExtra0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement < 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;NoExtra triggers move supplies from out to 100% rather than to Emergency for Good Logisticians.
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement < 1
          and Trait Supplies > 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyIncrement  7  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_Ship_NoExtra0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement < 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;NoExtra triggers move supplies from out to 100% rather than to Emergency for Good Logisticians.
;------------------------------------------
Trigger SupplyIncGet_ship_0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement < 1
          and Trait Supplies > 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyIncrement  7  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_Ship_InflationNoExtra0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement < 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;NoExtra triggers move supplies from out to 100% rather than to Emergency for Good Logisticians.
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement < 1
          and Trait Supplies > 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyIncrement  7  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_NoExtra0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement < 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;NoExtra triggers move supplies from out to 100% rather than to Emergency for Good Logisticians.
;------------------------------------------
Trigger SupplyIncGet_Encamped_0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement < 1
          and Trait Supplies > 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyIncrement  7  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_NoExtra0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement < 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1
          and Trait Supplies = 6
          and Trait PoorLogistics < 2

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100

;NoExtra triggers move supplies from out to 100% rather than to Emergency for Good Logisticians.
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_0
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement < 1
          and Trait Supplies > 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SuppliesAdded  2  Chance  100
    Affects Supplies  1  Chance  100
    Affects SupplyIncrement  7  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
Trigger SupplyIncGet_city_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_ship_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
Trigger SupplyIncGet_city_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_ship_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
Trigger SupplyIncGet_city_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_ship_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
Trigger SupplyIncGet_city_4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_ship_4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
Trigger SupplyIncGet_city_5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_ship_5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
Trigger SupplyIncGet_city_6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  1  Chance  100
    Affects Poverty  2  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  1  Chance  100
    Affects MinusHundreds  1  Chance  100

; buy 1/8th. Standard Price from settlement
;------------------------------------------
Trigger SupplyIncGet_city_Inflation_6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. inflation Price from settlement
;------------------------------------------
Trigger SupplyIncGet_ship_6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double Standard Price from ship
;------------------------------------------
Trigger SupplyIncGet_ship_Inflation_6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and AtSea
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. double standard Price from ship + inflation
;------------------------------------------
Trigger SupplyIncGet_Encamped_6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 0
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  2  Chance  100
    Affects Poverty  3  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost  2  Chance  100
    Affects MinusHundreds  2  Chance  100

; buy 1/8th. double standard Price from camp
;------------------------------------------
Trigger SupplyIncGet_Encamped_Inflation_6
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Encamped = 1
          and Trait SupplyIncrement >= 1
          and Trait SupplyCost <= 1
          and Trait Wealth >= 7
          and I_EventCounter inflationon = 1
;          and Trait Debt < 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects SupplyIncrementCost  1  Chance  100
    Affects Cost  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects TreasuryCost 4  Chance  100
    Affects MinusHundreds  4  Chance  100

; buy 1/8th. inflation Price from camp
;------------------------------------------
; should not need 7th as will always have at least 1 already. 1+6=7 & if 8 needed then is done with supply 1/4s anyway.
;------------------------------------------
;Trigger SupplyIncGet_city_7
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and EndedInSettlement
;          and Trait SupplyIncrement >= 1
;          and Trait SupplyCost <= 1
;          and Trait Wealth >= 7
;          and I_EventCounter inflationon = 0
;;          and Trait Debt < 1
;
;    Affects SupplyIncrementReset  2  Chance  100
;    Affects SupplyIncrement  1  Chance  100
;    Affects SupplyIncrementCost  1  Chance  100
;    Affects Cost  1  Chance  100
;    Affects Poverty  2  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost  1  Chance  100
;    Affects MinusHundreds  1  Chance  100
;
;; buy 1/8th. Standard Price from settlement
;;------------------------------------------
;Trigger SupplyIncGet_city_Inflation_7
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and EndedInSettlement
;          and Trait SupplyIncrement >= 1
;          and Trait SupplyCost <= 1
;          and Trait Wealth >= 7
;          and I_EventCounter inflationon = 1
;;          and Trait Debt < 1
;
;    Affects SupplyIncrementReset  2  Chance  100
;    Affects SupplyIncrement  1  Chance  100
;    Affects SupplyIncrementCost  1  Chance  100
;    Affects Cost  2  Chance  100
;    Affects Poverty  3  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost  2  Chance  100
;    Affects MinusHundreds  2  Chance  100
;
;; buy 1/8th. inflation Price from settlement
;;------------------------------------------
;Trigger SupplyIncGet_ship_7
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and AtSea
;          and Trait SupplyIncrement >= 1
;          and Trait SupplyCost <= 1
;          and Trait Wealth >= 7
;          and I_EventCounter inflationon = 0
;;          and Trait Debt < 1
;
;    Affects SupplyIncrementReset  2  Chance  100
;    Affects SupplyIncrement  1  Chance  100
;    Affects SupplyIncrementCost  1  Chance  100
;    Affects Cost  2  Chance  100
;    Affects Poverty  3  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost  2  Chance  100
;    Affects MinusHundreds  2  Chance  100
;
;; buy 1/8th. double Standard Price from ship
;;------------------------------------------
;Trigger SupplyIncGet_ship_Inflation_7
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and AtSea
;          and Trait SupplyIncrement >= 1
;          and Trait SupplyCost <= 1
;          and Trait Wealth >= 7
;          and I_EventCounter inflationon = 1
;;          and Trait Debt < 1
;
;    Affects SupplyIncrementReset  2  Chance  100
;    Affects SupplyIncrement  1  Chance  100
;    Affects SupplyIncrementCost  1  Chance  100
;    Affects Cost  4  Chance  100
;    Affects Poverty  5  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost 4  Chance  100
;    Affects MinusHundreds  4  Chance  100
;
;; buy 1/8th. double standard Price from ship + inflation
;;------------------------------------------
;Trigger SupplyIncGet_Encamped_7
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait Encamped = 1
;          and Trait SupplyIncrement >= 1
;          and Trait SupplyCost <= 1
;          and Trait Wealth >= 7
;          and I_EventCounter inflationon = 0
;;          and Trait Debt < 1
;
;    Affects SupplyIncrementReset  2  Chance  100
;    Affects SupplyIncrement  1  Chance  100
;    Affects SupplyIncrementCost  1  Chance  100
;    Affects Cost  2  Chance  100
;    Affects Poverty  3  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost  2  Chance  100
;    Affects MinusHundreds  2  Chance  100
;
;; buy 1/8th. double standard Price from camp
;;------------------------------------------
;Trigger SupplyIncGet_Encamped_Inflation_7
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait Encamped = 1
;          and Trait SupplyIncrement >= 1
;          and Trait SupplyCost <= 1
;          and Trait Wealth >= 7
;          and I_EventCounter inflationon = 1
;;          and Trait Debt < 1
;
;    Affects SupplyIncrementReset  2  Chance  100
;    Affects SupplyIncrement  1  Chance  100
;    Affects SupplyIncrementCost  1  Chance  100
;    Affects Cost  4  Chance  100
;    Affects Poverty  5  Chance  100
;    Affects Wealth  1  Chance  100
;    Affects TreasuryCost 4  Chance  100
;    Affects MinusHundreds  4  Chance  100
;
;; buy 1/8th. inflation Price from camp
;;------------------------------------------
; Reset ForageIncrement and TIF when in Settlement
;------------------------------------------
Trigger ForageSizeResetChip4Settlement
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait ForageIncrement >= 4

    Affects ForageIncrementReset  5  Chance  100
    Affects ForageIncrement  1  Chance  100
; -4
;------------------------------------------
Trigger ForageSizeResetChip3Settlement
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait ForageIncrement >= 3

    Affects ForageIncrementReset  4  Chance  100
    Affects ForageIncrement  1  Chance  100
; -3
;------------------------------------------
Trigger ForageSizeResetChip2Settlement
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait ForageIncrement >= 2

    Affects ForageIncrementReset  3  Chance  100
    Affects ForageIncrement  1  Chance  100
; -2
;------------------------------------------
Trigger ForageSizeResetChip1Settlement
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and EndedInSettlement
          and Trait ForageIncrement >= 1

    Affects ForageIncrementReset  2  Chance  100
    Affects ForageIncrement  1  Chance  100
; -1
;------------------------------------------
Trigger TIFReset
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and CharacterIsLocal
          and Trait TimeInField > 2

    Affects TIFReset 10  Chance  100
    Affects TimeInField  8  Chance  100

; In settlement. Chipaway 2x TIF if >2 then -2. Non religious settlement gets field time reset here too but no resupply.
;------------------------------------------
Trigger TIFReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and CharacterIsLocal
          and Trait TimeInField > 1

    Affects TIFReset 10  Chance  100
    Affects TimeInField  9  Chance  100

; In settlement. Chipaway 1x TIF if >1 then -1 should make all tif values to 1
;------------------------------------------
Trigger TIFReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and CharacterIsLocal
          and Trait TimeInField = 1

    Affects TIFReset 10  Chance  100
    Affects TimeInField  9  Chance  100

;In settlement. Chipaway 1x TIF if =1 then -1 should make all tif values to 0. Add more of these e.g if decide to make 5 turns in region possible
;------------------------------------------
; Supply Usage
;------------------------------------------
Trigger SupplyUsedEnemy1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and InEnemyLands
          and Trait TimeInField = 2
          and Trait Supplies = 6

    Affects TimeInField  2  Chance  100

;  1/4 Supplies used in enemy land. Enemy land uses 1/4 per 2 turns. Sets timein field to 4 if supply = out, therefore can be reduced no further.
;Timeinfield set to 4 to show 4th level. Extra Done changed 5 to 6.
;------------------------------------------
Trigger SupplyUsedEnemy2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and InEnemyLands
          and Trait TimeInField = 2
          and Trait Supplies <= 5
;          and Trait SupplyIncrement = 8

;    Affects Supplies  1  Chance  100
    Affects TimeInField  2  Chance  100

;  1/4 Supplies used in enemy land. Enemy land uses 1/4 per 2 turns. Sets timein field to 4 if supplies not out and reduces supplies.
;Timeinfield set to 4 to show 4th level. Extra Done changed 4 to 5.
;------------------------------------------
; SupplyIncrement Prior to Supply Usage
;------------------------------------------
Trigger SupplyIncSize1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 4
          and Trait Supplies <= 5
          and Trait SupplyIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit >= 40
          and Trait ArmySize = 1

    Affects SupplyIncrement  2  Chance  100

; would ideally be supplyinc 1, but such low consumption is bad for gameplay.
; now same for 1/8th army as for 1/4 army.
;------------------------------------------
Trigger SupplyIncSize2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 4
          and Trait Supplies <= 5
          and Trait SupplyIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit >= 20
;          and PercentageUnitAttribute general_unit < 40
          and Trait ArmySize = 2

    Affects SupplyIncrement  2  Chance  100

;------------------------------------------
Trigger SupplyIncSize4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 4
          and Trait Supplies <= 5
          and Trait SupplyIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit >= 10
;          and PercentageUnitAttribute general_unit < 20
          and Trait ArmySize = 3

    Affects SupplyIncrement  4  Chance  100

;------------------------------------------
Trigger SupplyIncSize8
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 4
          and Trait Supplies <= 5
          and Trait SupplyIncrement <= 7
;          and Trait ArmySize >= 1
;          and PercentageUnitAttribute general_unit < 10
          and Trait ArmySize = 4

    Affects SupplyIncrement  8  Chance  100

;------------------------------------------
Trigger SupplyUsedEnemyOrFriendlyLand
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
          and Trait TimeInField = 4
          and Trait Supplies <= 5
          and Trait SupplyIncrement = 8

    Affects SupplyIncrementReset  9  Chance  100
    Affects SupplyIncrement  1  Chance  100
    Affects Supplies  1  Chance  100

;  1/4 Supplies used in enemy land. Enemy land uses 1/4 per 2 turns. Sets timein field to 4 if supplies not out and reduces supplies.
;Timeinfield set to 4 to show 4th level. Extra Done changed 4 to 5.
; should leave some increment if was over 8, i.e. it will be a fraction off the next 1/4 of supplies that is left.
;------------------------------------------
Trigger NoExtraSuppliesLevelJump
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 5
          and not Trait PoorLogistics > 1

    Affects Supplies  1  Chance  100

;Does not need to change for new supply increment
; if not good logistician(i.e.poorlogistics value2) then jumps the emergency supplies level to go straight to out of supplies. 5=emergency, 6 = outofsupplies. NoExtra done.
;------------------------------------------
; SupplyInc Resets upto 10
; if supplies are out then the increments need to be reset as there is no supply 1/4 left hence no fractions of it.
;------------------------------------------
Trigger SupplyIncResets4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
;          and Trait TimeInField = 4
          and Trait Supplies = 6
          and Trait SupplyIncrement >= 4

    Affects SupplyIncrementReset  5  Chance  100
    Affects SupplyIncrement  1  Chance  100

;------------------------------------------
Trigger SupplyIncResets3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
;          and Trait TimeInField = 4
          and Trait Supplies = 6
          and Trait SupplyIncrement >= 3

    Affects SupplyIncrementReset  4  Chance  100
    Affects SupplyIncrement  1  Chance  100

;------------------------------------------
Trigger SupplyIncResets2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
;          and Trait TimeInField = 4
          and Trait Supplies = 6
          and Trait SupplyIncrement >= 2

    Affects SupplyIncrementReset  3  Chance  100
    Affects SupplyIncrement  1  Chance  100

;------------------------------------------
Trigger SupplyIncResets1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and not AtSea
          and not EndedInSettlement
;          and Trait TimeInField = 4
          and Trait Supplies = 6
          and Trait SupplyIncrement >= 1

    Affects SupplyIncrementReset  2  Chance  100
    Affects SupplyIncrement  1  Chance  100

;------------------------------------------
Trigger PoorLogisticianAdvised
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and EndedInSettlement
          and CharacterIsLocal
          and Trait Supplies = 1
          and Trait PoorLogistics = 1

    Affects AdvisedOnLogistics  2  Chance  100
    Affects PoorLogistics  1  Chance  100

;if poor logistician and has now resupplied in a settlement, not ship, then remove poor logistician. He has hopefully learned in the settlement. set to 0
;------------------------------------------
Trigger Starving_Reset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral

          and Trait Starving = 1
          and Trait TimeInField < 4

    Affects StarvingReset  2  Chance  100
    Affects Starving  1  Chance  100

;------------------------------------------
Trigger Starving_Reset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral

          and Trait Starving = 1
          and Trait Supplies < 6

    Affects StarvingReset  2  Chance  100
    Affects Starving  1  Chance  100

;------------------------------------------
Trigger Starving1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral

          and Trait Starving < 1
          and Trait TimeInField = 4
          and Trait Supplies = 6

    Affects Starving  1  Chance  100

;------------------------------------------
; Supply Mirrors for GainMessages
;------------------------------------------
Trigger SupplyMirrorReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies <= 3
          and Trait SupplyMirror = 1

    Affects SupplyMirror -1  Chance  100

; reduces supply mirror if supplies dont require a message
;------------------------------------------
Trigger SupplyMirrorReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies <= 3
          and Trait SupplyMirror = 2

    Affects SupplyMirror -2  Chance  100

; reduces supply mirror if supplies dont require a message
;------------------------------------------
Trigger SupplyMirrorReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies <= 3
          and Trait SupplyMirror = 3

    Affects SupplyMirror -3  Chance  100

; reduces supply mirror if supplies dont require a message. remember SM 3 = lvl 6 not 3.
;------------------------------------------1=4, 2=5, 3=6
Trigger SupplyMirror4a
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 4
          and Trait SupplyMirror = 2

    Affects SupplyMirror -1  Chance  100

; if 75%, but mirror = ES drop 1
;------------------------------------------
Trigger SupplyMirror4b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 4
          and Trait SupplyMirror = 3

    Affects SupplyMirror -2  Chance  100

; if 75%, but mirror = out drop 2
;------------------------------------------
Trigger SupplyMirror4c
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 4
          and Trait SupplyMirror = 0

    Affects SupplyMirror  1  Chance  100

; if 75%, but mirror = 0 add 1
;------------------------------------------
Trigger SupplyMirror5a
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 5
          and Trait SupplyMirror = 1

    Affects SupplyMirror  1  Chance  100

; if ES%, but mirror = 75 add 1
;------------------------------------------
Trigger SupplyMirror5b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 5
          and Trait SupplyMirror = 3

    Affects SupplyMirror -1  Chance  100

; if ES%, but mirror = out drop 1
;------------------------------------------
Trigger SupplyMirror5c
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 5
          and Trait SupplyMirror = 0

    Affects SupplyMirror  2  Chance  100

; if emergency, but mirror =0 add 2
;------------------------------------------
Trigger SupplyMirror6a
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait SupplyMirror = 1

    Affects SupplyMirror  2  Chance  100

; if out, but mirror = 75 add 2
;------------------------------------------
Trigger SupplyMirror6b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait SupplyMirror = 2

    Affects SupplyMirror 1  Chance  100

; if out, but mirror = ES add 1
;------------------------------------------
Trigger SupplyMirror6c
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Supplies = 6
          and Trait SupplyMirror = 0

    Affects SupplyMirror  3  Chance  100

; if out, but mirror = 0, add 3
;------------------------------------------
; Supply Purchases per Turn Mirror (supplycostmirror)
;------------------------------------------
Trigger SupplyCostMirror1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 1

    Affects SupplyCostMirror  1  Chance  100
    Affects SupplyCostMirrorReset  1  Chance  100

;------------------------------------------
Trigger SupplyCostMirror2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 2

    Affects SupplyCostMirror  2  Chance  100
    Affects SupplyCostMirrorReset  2  Chance  100

;------------------------------------------
Trigger SupplyCostMirror3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 3

    Affects SupplyCostMirror  3  Chance  100
    Affects SupplyCostMirrorReset  3  Chance  100

;------------------------------------------
Trigger SupplyCostMirror4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 4

    Affects SupplyCostMirror  4  Chance  100
    Affects SupplyCostMirrorReset  4  Chance  100

;------------------------------------------
Trigger SupplyCostMirror5
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait SupplyCost = 5

    Affects SupplyCostMirror  5  Chance  100
    Affects SupplyCostMirrorReset  5  Chance  100

;------------------------------------------
; Individual Corruption
;------------------------------------------
Trigger Corruption_Reset
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
             and Trait Caught = 1

    Affects CaughtReset  1  Chance  100 

;------------------------------------------
Trigger Caught_Reset2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
             and Trait Caught = 2

    Affects CaughtReset  2  Chance  100 

;------------------------------------------
Trigger Corruptor_Poor_10_5000
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
             and GovernorTaxLevel <= tax_extortionate
             and not Trait DefiedOrders >= 3
             and TimeInRegion >= 7
             and Attribute Loyalty <= 3
             and Attribute Piety <= 3
             and Trait Wealth <= 7
             and Trait TreasuryWealth <= 1
             and Trait TreasuryCost <= 8
             and not IsFactionLeader
             and Treasury > 10000
             and Treasury < 30000
          and RandomPercent < 5
             and FactionLeaderTrait CentralisedPower <= 2

    Affects Wealth  50  Chance  100 
    Affects TreasuryWealth  5  Chance  100 
    Affects TreasuryCost  5  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  15  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects Caught  1  Chance  25 

;------------------------------------------
Trigger Corruptor_Poor_30_5000
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
             and GovernorTaxLevel <= tax_extortionate
             and not Trait DefiedOrders >= 3
             and TimeInRegion >= 7
             and Attribute Loyalty <= 3
             and Attribute Piety <= 3
             and Trait Wealth <= 7
             and Trait TreasuryWealth <= 1
             and Trait TreasuryCost <= 8
             and not IsFactionLeader
             and Treasury >= 30000
          and RandomPercent < 8
             and FactionLeaderTrait CentralisedPower <= 2

    Affects Wealth  50  Chance  100 
    Affects TreasuryWealth  5  Chance  100 
    Affects TreasuryCost  5  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  15  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects Caught  1  Chance  25 

;------------------------------------------
Trigger Corruptor_Rich_20_5000
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and Trait TreasuryWealth <= 1
             and Trait TreasuryCost <= 8
             and not IsFactionLeader
             and Treasury > 20000
             and Treasury < 50000
          and RandomPercent < 7
             and FactionLeaderTrait CentralisedPower <= 2

    Affects Wealth  50  Chance  100 
    Affects TreasuryWealth  5  Chance  100 
    Affects TreasuryCost  5  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  15  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger Corruptor_Rich_50_5000
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and Trait TreasuryWealth <= 1
             and Trait TreasuryCost <= 8
             and not IsFactionLeader
             and Treasury >= 50000
          and RandomPercent < 20
             and FactionLeaderTrait CentralisedPower <= 2

    Affects Wealth  50  Chance  100 
    Affects TreasuryWealth  5  Chance  100 
    Affects TreasuryCost  5  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  15  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger Corruptor_Poor_Cent_10_8100
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
             and GovernorTaxLevel <= tax_extortionate
             and not Trait DefiedOrders >= 3
             and TimeInRegion >= 7
             and Attribute Loyalty <= 3
             and Attribute Piety <= 3
             and Trait Wealth <= 7
             and not IsFactionLeader
             and Treasury > 10000
             and Treasury < 30000
          and RandomPercent < 5
             and FactionLeaderTrait CentralisedPower >= 3

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  25 

;------------------------------------------
Trigger Corruptor_Poor_Cent_30_8100
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
             and GovernorTaxLevel <= tax_extortionate
             and not Trait DefiedOrders >= 3
             and TimeInRegion >= 7
             and Attribute Loyalty <= 3
             and Attribute Piety <= 3
             and Trait Wealth <= 7
             and not IsFactionLeader
             and Treasury >= 30000
          and RandomPercent < 8
             and FactionLeaderTrait CentralisedPower >= 3

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  25 

;------------------------------------------
Trigger Corruptor_Rich_LoDefy_over2_1000c3
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and Trait DefiedOrders >= 1
             and Trait DefiedOrders < 3
             and Attribute Loyalty <= 5
             and Attribute Piety <= 4
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury >= 2000
          and RandomPercent <= 5
             and FactionLeaderTrait CentralisedPower = 3

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  11  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects Caught  1  Chance  20 

;this one can push faction into debt
;------------------------------------------
Trigger Corruptor_Rich_LoDefy_over2_1000c4
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and Trait DefiedOrders >= 1
             and Trait DefiedOrders < 3
             and Attribute Loyalty <= 5
             and Attribute Piety <= 4
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury >= 2000
          and RandomPercent <= 10
             and FactionLeaderTrait CentralisedPower = 4

    Affects Wealth  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  11  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects Caught  1  Chance  20 

;this one can push faction into debt
;------------------------------------------
Trigger Corruptor_Rich_Cent_under20_8100
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury >= 5000
             and Treasury <= 20000
          and RandomPercent < 4
             and FactionLeaderTrait CentralisedPower >= 3

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  20 

;this one can push faction into debt
;------------------------------------------
Trigger Corruptor_Rich_Cent_20_8100c3
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury > 20000
             and Treasury < 50000
          and RandomPercent < 7
             and FactionLeaderTrait CentralisedPower = 3

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger Corruptor_Rich_Cent_20_8100c4_UnL
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury > 20000
             and Treasury < 50000
          and RandomPercent < 10
             and FactionLeaderTrait CentralisedPower = 4

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger Corruptor_Rich_Cent_20_8100c4_L
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty > 4
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury > 20000
             and Treasury < 50000
          and RandomPercent < 3
             and FactionLeaderTrait CentralisedPower = 4

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger Corruptor_Rich_Cent_50_8100c3
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury >= 50000
          and RandomPercent < 10
             and FactionLeaderTrait CentralisedPower = 3

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger Corruptor_Rich_Cent_50_8100c4
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
             and not InEnemyLands
             and not AtSea
             and not Trait DefiedOrders >= 3
             and Attribute Loyalty <= 4
             and Attribute Piety <= 3
             and Trait Wealth >= 8
             and not IsFactionLeader
             and Treasury >= 50000
          and RandomPercent < 15
             and FactionLeaderTrait CentralisedPower = 4

    Affects Wealth  81  Chance  100 
    Affects TreasuryNine  1  Chance  100 
    Affects MinusThousands  10  Chance  100 
    Affects Thousands  18  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  11  Chance  100 
    Affects Caught  1  Chance  20 

;------------------------------------------
Trigger AI_Boost
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and not CharacterIsLocal
          and Trait Healing < 1

    Affects Healing 1 Chance 100

;------------------------------------------
Trigger AI_UnBoost
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Healing = 1

    Affects Healing  1 Chance 100

;Ai characters bought by humans lose equalizing trait
;------------------------------------------
Trigger BesiegedReset1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not IsUnderSiege
          and Trait Besieged > 0

    Affects NotBesieged 2 Chance 100
    Affects Besieged 1 Chance 100

;to reset dishonor when not undersiege
;------------------------------------------
Trigger BesiegedReset2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not IsUnderSiege
          and Trait Besieged > 0

    Affects NotBesieged 2 Chance 100
    Affects Besieged 1 Chance 100

;to reset dishonor when not undersiege
;------------------------------------------
Trigger BesiegedGeneral1
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and IsUnderSiege
          and Trait Besieged = 0
          and Trait Dishonor >= 2

    Affects Besieged 1 Chance 100

;goes to level 1 if dishonor is at level 2 ( dishonor level 1 is just warning level) and besieged
;General has allowed himself to become besieged. should reset when not besieged.
; triggers whilst besieged so could have warning to get outside help to lift siege. "If this general does not have the sense to call in outside help to initiate an attack..."
;------------------------------------------
Trigger BesiegedGeneral2
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and IsUnderSiege
          and Trait Besieged = 1
          and Trait Dishonor = 3

    Affects Besieged 1 Chance 100

;goes to level 2 if dishonor is at level 3 and besieged
;General has allowed himself to become besieged. should reset when not besieged.
; shows whilst besieged so could have warning to get outside help to lift siege. "If this general does not have the sense to call in outside help to initiate an attack..."
;------------------------------------------
Trigger Neglectedborders
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and I_ConflictType SallyBesieger
          and WasAttacker
          and BattleOdds > 0.5
          and BattleOdds < 1.5
          and Trait Dishonor < 3

    Affects Dishonor 1 Chance 100

;Gen fought and won a sally and is greater than half the size of the enemy.
;01-11-2007 added and is not being besieged by a pesky small ai army.
; (and didn't attack with units from outside of siege). count limit = 5
;------------------------------------------
Trigger FieldBattle
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
;          and WonBattle
          and not I_ConflictType SallyBesieger
          and not I_ConflictType Siege
          and PercentageEnemyKilled > 25
          and BattleOdds < 2
;          and WasAttacker
          and Trait Dishonor > 0

    Affects NoDishonor 10 Chance 100
    Affects Dishonor 9 Chance 100

;Gen fought (win or lose) a field battle. count limit =5. Nodishonour + 1. He doesn't even have to win the battle, at least is not exploiting and not constantly sallying.
;------------------------------------------
Trigger LargeFieldBattle2
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and not I_ConflictType SallyBesieger
          and not I_ConflictType Siege
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
;          and WasAttacker
          and Trait Dishonor > 0
          and PercentageUnitAttribute general_unit < 7

    Affects NoDishonor 10 Chance 100
    Affects Dishonor 9 Chance 100

;Gen fought and WON a major victory battle . count limit = 5 . Nodishonour (another) + 1
;------------------------------------------
;Major Victories and Field Morale Battle section
;------------------------------------------
Trigger Major_Victories_Count
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and PercentageUnitAttribute general_unit < 7

    Affects MVC 1 Chance 100

;------------------------------------------
Trigger Turnsaway_Victories
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Turnsaway > 1
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit < 7

    Affects Turnshome  40  Chance  100
    Affects Turnsaway  36  Chance  100

;improves/reduces turnsaway levels by 4 points on major victory
;------------------------------------------
Trigger Turnsaway_Victories2
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Turnsaway > 1
          and CharacterIsLocal
          and PercentageUnitAttribute general_unit < 7

    Affects Turnshome  40  Chance  100
    Affects Turnsaway  36  Chance  100

;improves/reduces turnsaway levels by 4 more points on major victory, staying within trait levels
;------------------------------------------
Trigger Turnsaway_Victories3
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Turnsaway > 1

    Affects Turnshome  40  Chance  100
    Affects Turnsaway  36  Chance  100

;as above, but for capturing settlement
;------------------------------------------
Trigger Turnsaway_Victories4
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleOdds < 1.2
          and BattleOdds >= 1
          and PercentageEnemyKilled > 40
          and Trait Turnsaway > 1
          and CharacterIsLocal

    Affects Turnshome  40  Chance  100
    Affects Turnsaway  38  Chance  100

;any closely matched victory that is not a major victory reduces turnsaway by a bit: 2 points
;------------------------------------------
Trigger Turnsaway_Victories5
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess < clear
          and BattleSuccess >= average
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Turnsaway > 1
          and CharacterIsLocal

    Affects Turnshome  40  Chance  100
    Affects Turnsaway  36  Chance  100

;improves/reduces turnsaway levels by 4 points on average victory, staying within trait levels
;------------------------------------------
Trigger Five_Major_Victories_Count
    WhenToTest PostBattle

    Condition IsGeneral
          and Trait MVC > 4

    Affects FMVC 1 Chance 100
    Affects MVC -5 Chance 100

;------------------------------------------
Trigger Twenty_Five_Major_Victories_Count
    WhenToTest PostBattle

    Condition IsGeneral
          and Trait FMVC > 4

    Affects TMVC 1 Chance 100
    Affects FMVC -5 Chance 100

;------------------------------------------
; Confidence & Overconfidence
;------------------------------------------
Trigger Small_Battles_OverConfidence1
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and I_ConflictType Normal
          and not GeneralFoughtFaction slave
          and BattleOdds > 1.7
          and Attribute Command > 3
          and Trait MVC < 3
          and Trait FMVC < 1
          and Trait TMVC < 1
          and Trait Ovcon < 3

    Affects Ovcon 1  Chance  100

; Ovcon +1 if fighting weak enemy and won in the field. After five (edit- 3) major battles you are immune to this trigger, not trait. overconfidence only counts up to 14 small battles.
;------------------------------------------
Trigger Small_Battles_OverConfidence2
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not GeneralFoughtFaction slave
          and BattleOdds > 1.7
          and Attribute Command > 3
          and Trait MVC < 3
          and Trait FMVC < 1
          and Trait TMVC < 1
          and Trait Ovcon < 3

    Affects Ovcon 3  Chance  100

; Ovcon +3 if taking a city with weak garrison. After five (edit- 3) major battles you are immune to this trigger, not trait. overconfidence only counts up to 14 small battles.
; and 5 settlement conquests
;------------------------------------------
Trigger Large_Battles_Confidence
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and PercentageEnemyKilled > 40
          and BattleOdds < 1.2
          and not I_ConflictType SallyBesieger

    Affects Con 21 Chance 100
    Affects Ovcon 20  Chance  100

;-1 ovcon
;------------------------------------------
Trigger Major_Victories_Confidence
    WhenToTest PostBattle

    Condition IsGeneral
          and CharacterIsLocal
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and not I_ConflictType SallyBesieger
          and PercentageUnitAttribute general_unit < 7

    Affects Con 22 Chance 100
    Affects Ovcon 20  Chance  100

;-2 ovcon
;------------------------------------------
Trigger EstatesEarnedThroughBattle_xest1
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait MVC = 2
          and Trait DefiedOrders <= 3
          and PercentageUnitAttribute general_unit < 7
          and FactionLeaderTrait xest = 1
          and I_EventCounter inflationon = 0

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  2  Chance  100
    Affects TreasuryCost  2  Chance  100
;men given Manorial Estates after 2, then every 5 after. Must come after mvc awarded. not to banished gens.
; treasury covers cost of this award
;------------------------------------------
Trigger EstatesEarnedThroughBattle_Inflation_xest1
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait MVC = 2
          and Trait DefiedOrders <= 3
          and PercentageUnitAttribute general_unit < 7
          and FactionLeaderTrait xest = 1
          and I_EventCounter inflationon = 1

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  4  Chance  100
    Affects TreasuryCost  4  Chance  100
;men given Manorial Estates after 2, then every 5 after. Must come after mvc awarded. not to banished gens.
; treasury covers cost of this award
;------------------------------------------
Trigger EstatesEarnedThroughBattle_xest2
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait MVC = 2
          and Trait DefiedOrders <= 3
          and PercentageUnitAttribute general_unit < 7
          and FactionLeaderTrait xest = 2
          and I_EventCounter inflationon = 0

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  3  Chance  100
;men given Manorial Estates after 2, then every 5 after. Must come after mvc awarded. not to banished gens.
; treasury covers cost of this award
;------------------------------------------
Trigger EstatesEarnedThroughBattle_Inflation_xest2
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait MVC = 2
          and Trait DefiedOrders <= 3
          and PercentageUnitAttribute general_unit < 7
          and FactionLeaderTrait xest = 2
          and I_EventCounter inflationon = 1

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  6  Chance  100
    Affects TreasuryCost  6  Chance  100
;men given Manorial Estates after 2, then every 5 after. Must come after mvc awarded. not to banished gens.
; treasury covers cost of this award
;------------------------------------------
Trigger EstatesEarnedViaConquest_xest1
    WhenToTest PostBattle

    Condition IsGeneral
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait DefiedOrders < 3
          and FactionLeaderTrait xest = 1
          and I_EventCounter inflationon = 0

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  2  Chance  100
    Affects TreasuryCost  2  Chance  100
; Treasury pays for this award, gen may have taken it for himself.
;------------------------------------------
Trigger EstatesEarnedViaConquest_Inflation_xest1
    WhenToTest PostBattle

    Condition IsGeneral
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait DefiedOrders < 3
          and FactionLeaderTrait xest = 1
          and I_EventCounter inflationon = 1

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  4  Chance  100
    Affects TreasuryCost  4  Chance  100
; Treasury pays for this award, gen may have taken it for himself.
;------------------------------------------
Trigger EstatesEarnedViaConquest_xest2
    WhenToTest PostBattle

    Condition IsGeneral
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait DefiedOrders < 3
          and FactionLeaderTrait xest = 2
          and I_EventCounter inflationon = 0

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  3  Chance  100
    Affects TreasuryCost  3  Chance  100
; Treasury pays for this award, gen may have taken it for himself.
;------------------------------------------
Trigger EstatesEarnedViaConquest_Inflation_xest2
    WhenToTest PostBattle

    Condition IsGeneral
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait DefiedOrders < 3
          and FactionLeaderTrait xest = 2
          and I_EventCounter inflationon = 1

    Affects Estates  1  Chance  100
    Affects TreasuryWealth  6  Chance  100
    Affects TreasuryCost  6  Chance  100
; Treasury pays for this award, gen may have taken it for himself.
;------------------------------------------
Trigger EstatesEarnedViaConquest_defied
    WhenToTest PostBattle

    Condition IsGeneral
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates <= 2
          and Trait Estates >= 1
          and Trait DefiedOrders >= 3

    Affects Estates  1  Chance  100
; Treasury need not pay for this award, gen may have taken it for himself.
; ok for banished gens carving a personal empire
;------------------------------------------
Trigger EstatesEarnedThroughBattleNewGen
    WhenToTest PostBattle

    Condition IsGeneral
          and WonBattle
          and BattleSuccess >= clear
          and PercentageEnemyKilled > 40
          and BattleOdds < 1
          and Trait Estates = 1
          and Trait MVC = 2
          and not Trait DefiedOrders = 4
          and PercentageUnitAttribute general_unit < 7

    Affects Estates  1  Chance  100
;men given Manorial Estates after 2, then every 5 after. Must come after mvc awarded. not to banished gens.
; treasury could cover cost of this award?
;these two account  for generals who take a city beofe they are auto awarded one next turn. This gives them both now, else he gets none.
;------------------------------------------
Trigger EstatesEarnedViaConquestNewGen
    WhenToTest PostBattle

    Condition IsGeneral
          and WasAttacker
          and WonBattle
          and I_ConflictType Siege
          and not I_ConflictType SallyBesieger
          and Trait Estates = 1

    Affects Estates  1  Chance  100
; Treasury need not pay for this award, gen may have taken it for himself.
; ok for banished gens carving a personal empire
;------------------------------------------
; Reset Reckons ME1 to ME4
;------------------------------------------
Trigger ME1Reset1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 4

    Affects MilitaryExpenses1Reset  5  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
;------------------------------------------
Trigger ME1Reset2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 3

    Affects MilitaryExpenses1Reset  4  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
;------------------------------------------
Trigger ME1Reset3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 2

    Affects MilitaryExpenses1Reset  3  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
;------------------------------------------
Trigger ME1Reset4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 1

    Affects MilitaryExpenses1Reset  2  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
;------------------------------------------
; reset ME2
;------------------------------------------
Trigger ME2Reset1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses2 >= 4

    Affects MilitaryExpenses2Reset  5  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
;------------------------------------------
Trigger ME2Reset2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses2 >= 3

    Affects MilitaryExpenses2Reset  4  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
;------------------------------------------
Trigger ME2Reset3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses2 >= 2

    Affects MilitaryExpenses2Reset  3  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
;------------------------------------------
Trigger ME2Reset4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses2 >= 1

    Affects MilitaryExpenses2Reset  2  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
;------------------------------------------
; reset ME3
;------------------------------------------
Trigger ME3Reset1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses3 >= 4

    Affects MilitaryExpenses3Reset  5  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
;------------------------------------------
Trigger ME3Reset2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses3 >= 3

    Affects MilitaryExpenses3Reset  4  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
;------------------------------------------
Trigger ME3Reset3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses3 >= 2

    Affects MilitaryExpenses3Reset  3  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
;------------------------------------------
Trigger ME3Reset4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses3 >= 1

    Affects MilitaryExpenses3Reset  2  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
;------------------------------------------
; reset ME4
;------------------------------------------
Trigger ME4Reset1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses4 >= 4

    Affects MilitaryExpenses4Reset  5  Chance  100 
    Affects MilitaryExpenses4  1  Chance  100 
;------------------------------------------
Trigger ME4Reset2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses4 >= 3

    Affects MilitaryExpenses4Reset  4  Chance  100 
    Affects MilitaryExpenses4  1  Chance  100 
;------------------------------------------
Trigger ME4Reset3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses4 >= 2

    Affects MilitaryExpenses4Reset  3  Chance  100 
    Affects MilitaryExpenses4  1  Chance  100 
;------------------------------------------
Trigger ME4Reset4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses4 >= 1

    Affects MilitaryExpenses4Reset  2  Chance  100 
    Affects MilitaryExpenses4  1  Chance  100 
;------------------------------------------
;------------------------------------------
; Add ME (Temp) to Reckon (ME1 to ME4), resetting ME (Temp)
; This 1st set will be different (transfers ME to ME1)
;------------------------------------------
Trigger MEtoME1_1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses = 9

    Affects MilitaryExpensesReset  10  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  9  Chance  100 
;------------------------------------------
Trigger MEtoME1_2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses = 9

    Affects MilitaryExpensesReset  10  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  9  Chance  100 
;------------------------------------------
Trigger MEtoME1_3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses = 9

    Affects MilitaryExpensesReset  10  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  9  Chance  100 
;------------------------------------------
Trigger MEtoME1_4chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses >= 4

    Affects MilitaryExpensesReset  5  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  4  Chance  100 
;------------------------------------------
Trigger MEtoME1_5chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses >= 3

    Affects MilitaryExpensesReset  4  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  3  Chance  100 
;------------------------------------------
Trigger MEtoME1_6chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses >= 2

    Affects MilitaryExpensesReset  3  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  2  Chance  100 
;------------------------------------------
Trigger MEtoME1_7chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses >= 1

    Affects MilitaryExpensesReset  2  Chance  100 
    Affects MilitaryExpenses  1  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
; any missed costs that are too high to count (over 3300) will get carried to next turn
;------------------------------------------
; ME1 to ME4 Reckoners
;------------------------------------------
Trigger ME1toME2_1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 = 9

    Affects MilitaryExpenses1Reset  10  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
;------------------------------------------
Trigger ME1toME3_2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 = 9

    Affects MilitaryExpenses1Reset  10  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses2Reset  2  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
;------------------------------------------
Trigger ME1toME4_3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 = 9

    Affects MilitaryExpenses1Reset  10  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses3Reset  2  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
    Affects MilitaryExpenses4  1  Chance  100 
;------------------------------------------
Trigger ME1toME2_4chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 4
          and Trait MilitaryExpenses2 >= 1

    Affects MilitaryExpenses1Reset  5  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses2  4  Chance  100 
;------------------------------------------
Trigger ME1toME3_4chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 4
          and Trait MilitaryExpenses3 >= 1

    Affects MilitaryExpenses1Reset  5  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses3  4  Chance  100 
;------------------------------------------
Trigger ME1toME4_4chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 4
          and Trait MilitaryExpenses4 >= 1

    Affects MilitaryExpenses1Reset  5  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses4  4  Chance  100 
;------------------------------------------
Trigger ME1toME2_3chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 3
          and Trait MilitaryExpenses2 >= 1

    Affects MilitaryExpenses1Reset  4  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses2  3  Chance  100 
;------------------------------------------
Trigger ME1toME3_3chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 3
          and Trait MilitaryExpenses3 >= 1

    Affects MilitaryExpenses1Reset  4  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses3  3  Chance  100 
;------------------------------------------
Trigger ME1toME4_3chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 3
          and Trait MilitaryExpenses4 >= 1

    Affects MilitaryExpenses1Reset  4  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses4  3  Chance  100 
;------------------------------------------
Trigger ME1toME2_2chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 2
          and Trait MilitaryExpenses2 >= 1

    Affects MilitaryExpenses1Reset  3  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses2  2  Chance  100 
;------------------------------------------
Trigger ME1toME3_2chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 2
          and Trait MilitaryExpenses3 >= 1

    Affects MilitaryExpenses1Reset  3  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses3  2  Chance  100 
;------------------------------------------
Trigger ME1toME4_2chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 2
          and Trait MilitaryExpenses4 >= 1

    Affects MilitaryExpenses1Reset  3  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses4  2  Chance  100 
;------------------------------------------
Trigger ME1toME2_1chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 1
          and Trait MilitaryExpenses2 >= 1

    Affects MilitaryExpenses1Reset  2  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses2  1  Chance  100 
;------------------------------------------
Trigger ME1toME3_1chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 1
          and Trait MilitaryExpenses3 >= 1

    Affects MilitaryExpenses1Reset  2  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses3  1  Chance  100 
;------------------------------------------
Trigger ME1toME4_1chip
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MilitaryExpenses1 >= 1
          and Trait MilitaryExpenses4 >= 1

    Affects MilitaryExpenses1Reset  2  Chance  100 
    Affects MilitaryExpenses1  1  Chance  100 
    Affects MilitaryExpenses4  1  Chance  100 

;------------------------------------------
;------------------------------------------
;BGR Triggers Part 1 Ends Here. More Triggers at end of file.
;
;NOTE BB&B triggers and traits tweaked to match BGR versions.
;------------------------------------------
;BGR Triggers Part 2 Begins Here.
;------------------------------------------
;next 6 Byg Triggers for use if BBB mod present
;------------------------------------------
;------------------------------------------
Trigger Captured_Settlement
    WhenToTest GeneralCaptureSettlement

    Condition FactionLeaderTrait Offensive_To_Nobles >= 1
	and IsFactionLeader

    Affects Offensive_To_Nobles -1  Chance  100

; byg wholly new trigger to bounce leader back from offensive trait... check if generalcapturesett trigger can only affect leader
;------------------------------------------
Trigger Captured_Settlement2
    WhenToTest GeneralCaptureSettlement

    Condition FactionLeaderTrait Offensive_To_Nobles >= 1
	and not IsFactionLeader
	and Trait Disobedient >= 1

    Affects Obedient 1 Chance  100

;byg disloyal general becomes loyal on taking settlement, pleased with his leaders mission, obedient  and nothing wont become more obedient though
;------------------------------------------
Trigger Captured_Settlement3
    WhenToTest GeneralCaptureSettlement

    Condition FactionLeaderTrait Offensive_To_Nobles >= 1
	and not IsFactionLeader
	and Trait Obedient <= 1

    Affects Obedient 1 Chance  100

;byg obedient or nothing general becomes more obedient on taking settlement, pleased with his leaders mission
;------------------------------------------
Trigger Leader_Major_Victory
    WhenToTest PostBattle

    Condition FactionLeaderTrait Offensive_To_Nobles >= 1
          and IsFactionLeader
          and WonBattle
          and not BattleOdds < 1
          and PercentageEnemyKilled > 40
          and PercentageUnitAttribute general_unit < 7

    Affects Offensive_To_Nobles -1  Chance  100

;byg new trait cancels offends nobility by 1 level if leader wins major victory
;------------------------------------------
Trigger Loyalty_Realism
    WhenToTest CharacterTurnEnd

    Condition FactionLeaderTrait Offensive_To_Nobles >= 1
	and IsGeneral
	and not IsFactionLeader
                and Trait Loyal >= 2
	and Trait Disobedient >= 1

    Affects Obedient 1 Chance  50

;byg may set any disobedient gens with loyal trait very loyal or better as obedient
;------------------------------------------
Trigger No_Offending_for_AI
    WhenToTest CharacterTurnEnd

    Condition FactionLeaderTrait Offensive_To_Nobles >= 1
	and IsFactionLeader
	and not CharacterIsLocal

    Affects Offensive_To_Nobles -1  Chance  100

; byg enable/disable this trigger to stop/start ai offending nobles.
;in mid campaign will recover ai if save game compatible
;------------------------------------------
; Field Morale System
;------------------------------------------
Trigger SetGensReady
    WhenToTest CharacterTurnStart

    Condition I_TurnNumber = 0
          and Trait Supplies = 0

    Affects Turnsaway  12  Chance  100
    Affects Supplies  1  Chance  100

; So all Gens start at Turnsaway level Ready. Removed "and CharacterIsLocal"
;------------------------------------------
Trigger Turns_Away_NewGen
    WhenToTest CharacterTurnEnd

    Condition Trait Supplies < 1

    Affects Turnsaway  12  Chance  100
    Affects Supplies  3  Chance  100

; ready level to new gens, CharacterTurnStart didn't work for new gens. Removed "and CharacterIsLocal"
;------------------------------------------
Trigger Turns_Away
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and PopulationOwnReligion < 50
          and CharacterIsLocal

    Affects Away  1  Chance  100

;In settlement, but in low religion home territory
;------------------------------------------
Trigger Turns_Away2
    WhenToTest CharacterTurnEnd

    Condition not EndedInSettlement
          and CharacterIsLocal

    Affects Away  1  Chance  100

; if you aren't in a settlement then you are away
;------------------------------------------
Trigger Turns_Away3
    WhenToTest CharacterTurnEnd

    Condition EndedInSettlement
          and Trait Away > 0
          and CharacterIsLocal
          and SettlementBuildingExists >= wooden_pallisade

    Affects Away  -1  Chance  100

; if settlement has no military buildings (you destroyed them or weren't built) then you are NOT away (old method)
; general and army recuperates if in city, even if <50 religion.
; in summary, armies recover in any settlement except castles below 50% own religion. CHANGED GOVERNORBUILDING TO SETTLEMENT >=wooden etc
; because was only affecting the governor, not other generals in town
;------------------------------------------
Trigger Home_decrease1
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway > 2

    Affects Turnshome 40  Chance  100
    Affects Turnsaway 36  Chance  100

;reduces levels ready to mutinous by 1 level
;------------------------------------------
Trigger Home_decrease2
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway = 3

    Affects Turnshome  40  Chance  100
    Affects Turnsaway  36  Chance  100

;ready and what was originally weary now go down to eager
;------------------------------------------
Trigger Home_Increase1
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway = 2

    Affects Turnshome  39  Chance  100
    Affects Turnsaway  40  Chance  100

; these next 4 triggers add 1 to eager until ready, at 12 points. now, original eager, ready and weary all at 12 points on ready.
;------------------------------------------
Trigger Home_Increase2
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway = 2

    Affects Turnshome  39  Chance  100
    Affects Turnsaway  40  Chance  100

;------------------------------------------
Trigger Home_Increase3
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway = 2

    Affects Turnshome  39  Chance  100
    Affects Turnsaway  40  Chance  100

;------------------------------------------
Trigger Home_Increase4
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway = 2

    Affects Turnshome  39  Chance  100
    Affects Turnsaway  40  Chance  100

;NOTE could just put Turnsaway  1 Chance  100, Turnshome only needed if reducing turnsaway!
;------------------------------------------
Trigger Home_Increase5
    WhenToTest CharacterTurnEnd

    Condition Trait Away < 1
          and CharacterIsLocal
          and Trait Turnsaway < 2

    Affects Turnshome  20  Chance  100
    Affects Turnsaway  21  Chance  100

; adds 1 points (not level) to anything below eager. So Bent takes 4x longer to lose than eager in a native city.
;------------------------------------------
;Trigger Turns_Away_Limit
;    WhenToTest CharacterTurnEnd
;
;    Condition Trait Away > 0
;           and Trait Turnsaway = 8
;          and CharacterIsLocal
;
;    Affects Turnshome  40  Chance  100
;    Affects Turnsaway  39  Chance  100
;
;;Mutinous, from previous turn, reduce one point, so mutinous never > 32 points-----------edited allowed over 32, prevents multigains
;------------------------------------------
Trigger Turns_Away_Increment
    WhenToTest CharacterTurnEnd

    Condition Trait Away > 0
          and CharacterIsLocal

    Affects Turnsaway  1  Chance  100
    Affects Away -1  Chance  100

; if NOT in settlement (non julii) or legion settlement increase turnsaway
;------------------------------------------
;King's Authority (Supplies Related)
;------------------------------------------
Trigger Kings_Authority_Reset1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait SuppressAuthority >= 4

    Affects AntiSuppress 10  Chance  100
    Affects SuppressAuthority  6  Chance  100

;7 to 3, 6 to 2, 5 to 1, 4 to 0 (-4 equivalent)
;------------------------------------------
Trigger Kings_Authority_Reset2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait SuppressAuthority >= 2

    Affects AntiSuppress 10  Chance  100
    Affects SuppressAuthority  8  Chance  100

; 3 to 1, 2 to 0 (-2 equivalent)
;------------------------------------------
Trigger Kings_Authority_Reset3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait SuppressAuthority >= 1

    Affects AntiSuppress 10  Chance  100
    Affects SuppressAuthority  9  Chance  100

; 1 to 0 (-1 equivalent)
;3 triggers above drop SuppressAuthority trait to 0 from any number upto 7.
;------------------------------------------
; CRIME & PUNISHMENT
;------------------------------------------
; Attacks Against Orders
;------------------------------------------
; Gives NotComplied Trait Section
;------------------------------------------
Trigger AttackAgainstOrdersNC
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and not HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 3
;	and Trait Orders > 2
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
	and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

;If 'and notcomplied = 0' is removed it lets notcomplied go over 1 thresh. Means multiple breeches would make compliance take longer to achieve.
;i.e. even once a gen banished himself would take one extra turn per breech to clam faction down.
;------------------------------------------
Trigger AttackAgainstOrdersNCcp4a
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and not IsFactionHeir
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 4
;	and Trait Orders > 2
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
	and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

;picks up logens and wcs who are not the heir
;------------------------------------------
Trigger AttackAgainstOrdersNCcp4b
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and not HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 4
;	and Trait Orders > 2
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
	and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

; picks up logens and heir if not a wc
;------------------------------------------
Trigger AttackAgainstOrdersNCDO
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower >= 3
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
	and Trait NotComplied = 0
        and Trait DefiedOrders >= 3

    Affects NotComplied  1  Chance  100 

; covers WC criminals (summoned or banished) reflecting orders being broken again.
;------------------------------------------
; Not Complied Good and Bad
;------------------------------------------
Trigger NotReleaseAgainstOrdersNCDO
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType release
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

;For not sparing prisoners
;------------------------------------------
Trigger ExterminateAgainstOrdersNCDO
    WhenToTest ExterminatePopulation

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

;For not occupying settlement
;------------------------------------------
Trigger OccupyAgainstOrdersNCDO
    WhenToTest OccupySettlement

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

;For occupying settlement if Bad
;------------------------------------------
Trigger NotExecutingAgainstOrdersNCDO
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType execute
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait NotComplied = 0

    Affects NotComplied  1  Chance  100 

;for not executing prisoners
;------------------------------------------
; Giving Defied Orders Good and Bad Section (0 to 3 or 4)
;------------------------------------------
Trigger NotReleaseAgainstOrdersDO1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType release
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders < 1

    Affects DefiedOrders  3  Chance  100 

;For not sparing prisoners
;------------------------------------------
Trigger ExterminateAgainstOrdersDO1
    WhenToTest ExterminatePopulation

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders < 1

    Affects DefiedOrders  3  Chance  100 

;For not occupying settlement
;------------------------------------------
Trigger OccupyAgainstOrdersDO1
    WhenToTest OccupySettlement

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders < 1

    Affects DefiedOrders  4  Chance  100 

;For occupying settlement if Bad
;------------------------------------------
Trigger NotExecutingAgainstOrdersDO1
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType execute
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders < 1

    Affects DefiedOrders  4  Chance  100 

;for not executing prisoners
;------------------------------------------
; Giving Defied Orders Good and Bad Section (1 to 3 or 4)
;------------------------------------------
Trigger NotReleaseAgainstOrdersDO2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType release
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 1

    Affects DefiedOrders  2  Chance  100 

;For not sparing prisoners
;------------------------------------------
Trigger ExterminateAgainstOrdersDO2
    WhenToTest ExterminatePopulation

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 1

    Affects DefiedOrders  2  Chance  100 

;For not occupying settlement
;------------------------------------------
Trigger OccupyAgainstOrdersDO2
    WhenToTest OccupySettlement

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 1

    Affects DefiedOrders  3  Chance  100 

;For occupying settlement if Bad
;------------------------------------------
Trigger NotExecutingAgainstOrdersDO2
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType execute
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 1

    Affects DefiedOrders  3  Chance  100 

;for not executing prisoners
;------------------------------------------
; Giving Defied Orders Good and Bad Section (2 to 3 or 4)
;------------------------------------------
Trigger NotReleaseAgainstOrdersDO3
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType release
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 2

    Affects DefiedOrders  1  Chance  100 

;For not sparing prisoners
;------------------------------------------
Trigger ExterminateAgainstOrdersDO3
    WhenToTest ExterminatePopulation

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Good = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 2

    Affects DefiedOrders  1  Chance  100 

;For not occupying settlement
;------------------------------------------
Trigger OccupyAgainstOrdersDO3
    WhenToTest OccupySettlement

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 2

    Affects DefiedOrders  2  Chance  100 

;For occupying settlement if Bad
;------------------------------------------
Trigger NotExecutingAgainstOrdersDO3
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType execute
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 2

    Affects DefiedOrders  2  Chance  100 

;for not executing prisoners
;------------------------------------------
; Giving Defied Orders Good and Bad Section (3 to 4)
;------------------------------------------
Trigger OccupyAgainstOrdersDO4
    WhenToTest OccupySettlement

    Condition IsGeneral
        and CharacterIsLocal
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 3

    Affects DefiedOrders  1  Chance  100 

;For occupying settlement if Bad
;------------------------------------------
Trigger NotExecutingAgainstOrdersDO4
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition not RansomType execute
        and CharacterIsLocal
        and IsGeneral
        and not IsFactionLeader
;        and FactionLeaderTrait CentralisedPower = 4
        and FactionLeaderTrait Bad = 1
        and not AtSea
        and not IsOnCrusade
        and not IsOnJihad
        and Trait DefiedOrders = 3

    Affects DefiedOrders  1  Chance  100 

;for not executing prisoners
;------------------------------------------
; Gives Defied Orders Attack Against Orders Trait Section
;------------------------------------------
Trigger AttackAgainstOrdersDONC
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 3
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
        and Trait DefiedOrders = 3
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  1  Chance  100

;catches criminal WCs (summoned & in prof recruitment time) commiting crime again whether obeying prior punishment or not.
; so if they are crim3, then get wc anc, they can't suddenely get away with another transgression.
;------------------------------------------
Trigger AttackAgainstOrdersDO
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and not HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 3
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
        and Trait DefiedOrders < 4
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  1  Chance  100

;increments punishment for general or begins punishment. fine here too?
;------------------------------------------
Trigger AttackAgainstOrdersDOcp4a
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and IsFactionHeir
	and not HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 4
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
        and Trait DefiedOrders < 4
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  1  Chance  100

;picks up heir without being in WC, cp4
;increments punishment for general or begins punishment. fine here too?
;------------------------------------------
Trigger AttackAgainstOrdersDOcp4b
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and HasAncType warcouncil
	and not IsFactionHeir
	and not IsFactionLeader
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 4
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
        and Trait DefiedOrders < 4
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  1  Chance  100

; picks up wc without being heir or king cp4
;increments punishment for general or begins punishment. fine here too?
;------------------------------------------
Trigger AttackAgainstOrdersDOcp4c
    WhenToTest PostBattle

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
	and not IsFactionHeir
	and not HasAncType warcouncil
	and InEnemyLands
	and WasAttacker
	and not GeneralFoughtFaction slave
	and FactionLeaderTrait CentralisedPower = 4
	and not AtSea
        and PercentageUnitAttribute general_unit < 100
        and Trait DefiedOrders < 4
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  1  Chance  100

;increments punishment for general or begins punishment. fine here too?
;picks up not heir, not wc, not king, cp4
;------------------------------------------
;  Gain if Pardon available
;------------------------------------------
Trigger Announce_Pardon_Available
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and I_EventCounter ready_pardon = 1
                and Trait PardonAvailable < 1

    Affects PardonAvailable  1  Chance  100 
;------------------------------------------
Trigger Announce_Pardon_Available_Reset1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 1
                and Trait PardonAvailable = 1

    Affects PardonAvailable  -1  Chance  100 
;------------------------------------------
Trigger Announce_Pardon_Available_Reset2
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
	and IsFactionLeader
                and I_EventCounter ready_pardon = 0
                and Trait PardonAvailable = 1

    Affects PardonAvailable  -1  Chance  100 
;------------------------------------------
;  Pardons  Order Issued From Current & New Leader
;------------------------------------------
;  Current Leader Offers Pardon to Rabble Rousers
;------------------------------------------
Trigger CurrentLeaderOffersPardonGens1
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and Trait LeaderDefied > 0
                and I_EventCounter pardon_attempt = 1
                and I_EventCounter random_accept = 1

    Affects PardonAccepted  1  Chance  100 

;------------------------------------------
;Trigger CurrentLeaderOffersPardonGens2
;    WhenToTest CharacterTurnEnd
;
;    Condition CharacterIsLocal
;	and IsFactionLeader
;                and Trait Pardon = 0
;                and Trait LeaderDefied > 0
;                and I_EventCounter pardon_attempt = 1
;                and PardonAccepted = 0
;
;    Affects PardonAccepted  2  Chance  100 
;
;; if random rabblerouser did not accept the pardon 60% (1) then set PardonAccepted to 2. trigger not needed.
;------------------------------------------
Trigger CurrentLeaderWeakGrip1
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and Trait LeaderDefied > 0
                and I_EventCounter pardon_attempt = 1
                and Trait ReinsOfPower = 0

    Affects ReinsOfPower  1  Chance  100
; 0 to 1, weak if attempted
;------------------------------------------
Trigger CurrentLeaderWeakGrip2
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and Trait LeaderDefied > 0
                and I_EventCounter pardon_attempt = 1
                and Trait ReinsOfPower = 2

    Affects ReinsOfPowerReset  2  Chance  100
    Affects ReinsOfPower  1  Chance  100
;2 to 1, weak if attempted
;------------------------------------------
Trigger CurrentLeaderTightGrip1
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and Trait LeaderDefied > 0
                and I_EventCounter pardon_attempt = 2
                and Trait ReinsOfPower = 0

    Affects ReinsOfPower  2  Chance  100
; 0 to 2, strong if not attempted
;------------------------------------------
Trigger CurrentLeaderTightGrip2
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and Trait LeaderDefied > 0
                and I_EventCounter pardon_attempt = 2
                and Trait ReinsOfPower = 1

    Affects ReinsOfPower  1  Chance  100
; 1 to 2, strong now if not attempted, but previously did.
;------------------------------------------

Trigger CurrentLeaderNotPardoningGens2
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait Pardon = 0
                and Trait LeaderDefied > 0
                and I_EventCounter pardon_attempt = 1
                and Trait PardonAccepted = 0

    Affects PardonAccepted  2  Chance  100 
    Affects PardonAcceptedReset  3  Chance  100 
    Affects PardonAccepted  1  Chance  100 

;gives message and is then removed. 1=accepted 2= not accepted
;------------------------------------------
Trigger CurrentLeaderPardonsGens3
;    WhenToTest GovernorCityRebels
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsFactionLeader
                and Trait PardonAccepted = 1
                and Trait Pardon = 0

    Affects Pardon  1  Chance  100 
    Affects PardonAcceptedReset  2  Chance  100 
    Affects PardonAccepted  1  Chance  100 

;gives message and is then removed. Gives Pardon FL.
;------------------------------------------
; New Leader Issues Pardon
;------------------------------------------
Trigger NewLeaderPardonsGens
    WhenToTest BecomesFactionLeader

    Condition Trait Pardon < 1
;    Condition CharacterIsLocal*crashes with becomesfl
;          and Trait Pardon = 0
          and I_TurnNumber >= 1

    Affects Pardon  1  Chance  100 

;reset done nr end
;------------------------------------------
; Pardons Removed from Gens then Reapplied if FL has given Pardon Order
;------------------------------------------
; crusade pardoned section
;------------------------------------------
Trigger JoinCrusadeOrJihadPardonsGen
    WhenToTest GeneralJoinCrusade

    Condition CharacterIsLocal
          and Trait Pardoned = 0
          and Trait DefiedOrders >= 3

    Affects Pardoned  1  Chance  100 

;------------------------------------------
Trigger GensPardonedReset
    WhenToTest CharacterTurnEnd

    Condition Trait Pardoned = 1
          and not Trait crusadecost = 1
          and not Trait jihadcost = 1

    Affects PardonedReset  2  Chance  100 
    Affects Pardoned  1  Chance  100 

; Reset except when just joined crusade or jihad (done separately below)
;------------------------------------------
Trigger GensJoinCrusadePardonedDO3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait DefiedOrders = 3
          and Trait Pardoned = 1

    Affects DefiedOrdersReset  4  Chance  100 
    Affects DefiedOrders  1  Chance  100 
    Affects PardonedReset  2  Chance  100 
    Affects Pardoned  1  Chance  100 

;pardoned for summons when joined crusade then resets pardoned
;------------------------------------------
Trigger GensJoinCrusadePardonedDO4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait DefiedOrders = 4
          and Trait Pardoned = 1

    Affects DefiedOrdersReset  5  Chance  100 
    Affects DefiedOrders  1  Chance  100 
    Affects PardonedReset  2  Chance  100 
    Affects Pardoned  1  Chance  100 

;pardoned for banishment when joined crusade then resets pardoned
;------------------------------------------
; Current Leader Gives Pardoned Section
;------------------------------------------
Trigger CurrentLeaderGensPardoned3and4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
;          and FactionLeaderTrait Pardon = 1
          and Trait DefiedOrders >= 3
          and Trait Pardoned = 0
          and I_EventCounter pardon_attempt = 1
          and I_EventCounter random_accept = 1

    Affects Pardoned  1  Chance  100 

;  Pardoned Order Received by Criminal Gens if summoned or banished only.
; Need this separate section to catch gens read pre FL so no refs to FL here.
;------------------------------------------
Trigger CurrentLeaderGensPardonedRemoveDO3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait DefiedOrders = 3
          and Trait Pardoned = 1
          and I_EventCounter pardon_attempt = 1
          and I_EventCounter random_accept = 1

    Affects DefiedOrdersReset  4  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;pardoned for summons
;------------------------------------------
Trigger CurrentLeaderGensPardonedRemoveDO4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait DefiedOrders = 4
          and Trait Pardoned = 1
          and I_EventCounter pardon_attempt = 1
          and I_EventCounter random_accept = 1

    Affects DefiedOrdersReset  5  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;pardoned for banishment
;------------------------------------------
; New Leader Gives Pardoned Section
;------------------------------------------
Trigger NewLeaderGensPardonedAll
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and FactionLeaderTrait Pardon = 1
          and Trait DefiedOrders >= 1
          and Trait Pardoned = 0

    Affects Pardoned  1  Chance  100 

;  Issues Pardon Order to Criminal Gens
;------------------------------------------
Trigger NewLeaderGensPardoned1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and FactionLeaderTrait Pardon = 1
          and Trait DefiedOrders = 1
          and Trait Pardoned = 1

    Affects DefiedOrdersReset  2  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;pardoned for warning
;------------------------------------------
Trigger NewLeaderGensPardoned2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and FactionLeaderTrait Pardon = 1
          and Trait DefiedOrders = 2
          and Trait Pardoned = 1

    Affects DefiedOrdersReset  3  Chance  100 
    Affects DefiedOrders  1  Chance  100 

; pardoned for fine - but paid if same turn, record removed if later turn
;------------------------------------------
Trigger NewLeaderGensPardoned3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and FactionLeaderTrait Pardon = 1
          and Trait DefiedOrders = 3
          and Trait Pardoned = 1

    Affects DefiedOrdersReset  4  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;pardoned for summons
;------------------------------------------
Trigger NewLeaderGensPardoned4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and FactionLeaderTrait Pardon = 1
          and Trait DefiedOrders = 4
          and Trait Pardoned = 1

    Affects DefiedOrdersReset  5  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;pardoned for banishment
;------------------------------------------
; Removes Not Complied if Defied Orders Removed
;------------------------------------------
Trigger PardonedRemovesNotComplied
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Pardoned = 1
          and Trait DefiedOrders = 0
          and Trait NotComplied = 1

    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 

;removes not complied if exists if defied orders has been removed
;------------------------------------------
; New FL Pardons Self
;------------------------------------------
Trigger NewLeaderPardonsSelf1
    WhenToTest BecomesFactionLeader

    Condition Trait DefiedOrders = 1

    Affects DefiedOrdersReset  2  Chance  100 
    Affects DefiedOrders  1  Chance  100 

; could use pardoned instead of these triggers, but FL pardoned by himself looks wrong....will need to have notcomplied removed if exists..do elsewhere?
; Could negate all by removing 4 regardless of level as leader will never need this trait again.
; but would need to remove antitrait or it would show.
;------------------------------------------
Trigger NewLeaderPardonsSelf2
    WhenToTest BecomesFactionLeader

    Condition Trait DefiedOrders = 2

    Affects DefiedOrdersReset  3  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;------------------------------------------
Trigger NewLeaderPardonsSelf3
    WhenToTest BecomesFactionLeader

    Condition Trait DefiedOrders = 3

    Affects DefiedOrdersReset  4  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;------------------------------------------
Trigger NewLeaderPardonsSelf4
    WhenToTest BecomesFactionLeader

    Condition Trait DefiedOrders = 4

    Affects DefiedOrdersReset  5  Chance  100 
    Affects DefiedOrders  1  Chance  100 

;------------------------------------------
; Removes Not Complied if Defied Orders Removed For New FL
;------------------------------------------
Trigger RemovesNotCompliedFL
    WhenToTest BecomesFactionLeader

    Condition Trait NotComplied = 1

    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 

;removes not complied if exists in  NEW FL
;------------------------------------------
; Fines resets go at End turn - following deductions at start turn.
;------------------------------------------
Trigger FinesResetEnd1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
;          and CharacterIsLocal
          and Trait Fines >= 5

    Affects FinesReset  6  Chance  100
    Affects Fines  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger FinesResetEnd2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
;          and CharacterIsLocal
          and Trait Fines >= 3

    Affects FinesReset  4  Chance  100
    Affects Fines  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger FinesResetEnd3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
;          and CharacterIsLocal
          and Trait Fines >= 2

    Affects FinesReset  3  Chance  100
    Affects Fines  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
Trigger FinesResetEnd4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
;          and CharacterIsLocal
          and Trait Fines >= 1

    Affects FinesReset  2  Chance  100
    Affects Fines  1  Chance  100
;these trigs should come after script deduct
;------------------------------------------
; Fined for Corruption
;------------------------------------------
Trigger FinedForCorruption
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Caught = 1

    Affects Fines  8  Chance  100 
    Affects Poverty  41  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusThousands  4  Chance  100 

;Fined 4000, no effect on public order factionwide, does not affects criminal record. Corruption is common, but he simply got caught for it.
;------------------------------------------
; Checks for compliance with punishments
;------------------------------------------
;Trigger NotCompliedReset1
;   WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and Trait NotComplied = 1
;
;    Affects NotCompliedReset  2  Chance  100 
;    Affects NotComplied  1  Chance  100 
;
;resets NotComplied before re-adding
;------------------------------------------
Trigger Complied1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait DefiedOrders = 1
          and Trait NotComplied > 0

    Affects Fines  1  Chance  100 
    Affects Poverty  6  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 
    Affects MinusHundreds  5  Chance  100 

;if warning held for this turn then NotComplied = 0, Complied with punishment. Fined 500
; Note faction will still reel for a turn as DO causes are mirrored in script.
;------------------------------------------
Trigger Complied2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait DefiedOrders = 2
          and Trait NotComplied > 0

    Affects Fines  4  Chance  100 
    Affects Poverty  21  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 
    Affects MinusThousands  2  Chance  100 

;if fined held for this turn then NotComplied = 0, Complied with punishment. Fined 2000
;------------------------------------------
Trigger Complied3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait DefiedOrders = 3
          and DistanceCapital <= 3
          and Trait NotComplied > 0

    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 

;if in or next to capital then NotComplied = 0, Complied with punishment
;------------------------------------------
Trigger Complied4EnemyLand
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait DefiedOrders = 4
          and InEnemyLands
          and Trait NotComplied > 0

    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 

;if in foreign lands then NotComplied = 0, Complied with punishment
;------------------------------------------
Trigger Complied4AtSea
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait DefiedOrders = 4
          and AtSea
          and Trait NotComplied > 0

    Affects NotCompliedReset  2  Chance  100 
    Affects NotComplied  1  Chance  100 

;if at sea then NotComplied = 0, Complied with punishment
;------------------------------------------
; END SECTION reckoner 5 after supplies (-4800max (3x1600)) and fine (-500max)(5,300) and corruptor(only thousands currently).
; with ship+inflation, could be up to 9,600......................either reduce ship supply amounts or increase reckoners.
; Quadruple reckoner (copes to -5400).
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions pt 1
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndComply1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndComply1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndComply1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions pt 2
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndComply2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndComply2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndComply2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions pt 3
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndComply3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndComply3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndComply3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions pt 4
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndComply4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndComply4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndComply4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions pt 5
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndComply5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndComply5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndComply5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions pt 6
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEndComply6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1EndComply6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2EndComply6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEndComply
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEndComply
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; Check for non-compliance with orders
;------------------------------------------
Trigger NotCompliedSummoned3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait DefiedOrders = 3
          and DistanceCapital >= 4
          and Trait NotComplied < 1

    Affects NotComplied  1  Chance  100 

;if far from capital or wasn't, but left, then NotComplied = 1,  Not Complied with punishment
;------------------------------------------
Trigger NotCompliedBanishment4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait DefiedOrders = 4
          and not InEnemyLands
          and not AtSea
          and Trait NotComplied < 1

    Affects NotComplied  1  Chance  100 

;if in home lands or wasn't ,but returned, then NotComplied = 1,  Not Complied with punishment
;------------------------------------------
Trigger DefyingOrdersRemovesHasWarchest
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	and IsGeneral
	and not IsFactionLeader
;	and not HasAncType warcouncil
	and Trait DefiedOrders >= 3
;          and Trait NotComplied = 1--------not needed, will now stop recruitment for any summons or banishment history
	and Trait HasWarchest = 1

    Affects HasWarchestReset  2  Chance  100
    Affects HasWarchest  1  Chance  100

; removes haswarchest (recruiting authority), stops 1 level of recruitment
;------------------------------------------
Trigger DefyingOrdersStopsRecruit
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	  and IsGeneral
          and Trait StopR = 0
          and Trait DefiedOrders >= 3
;          and Trait NotComplied = 1--------not needed, will now stop recruitment for any summons or banishment history

    Affects StopR  1  Chance  100

; if summoned or banished stops another level of recruitment
;------------------------------------------
Trigger DefyingOrdersRemoveCPEffect
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
	  and IsGeneral
          and Trait CentralisedPowerEffect = 1
          and Trait DefiedOrders >= 3
;          and Trait NotComplied = 1--------not needed, will now stop recruitment for any summons or banishment history

    Affects CentralisedPowerReset  2  Chance  100
    Affects CentralisedPowerEffect  1  Chance  100

; if summoned or banished stops another level of recruitment
;------------------------------------------
; Leader defied reset
;------------------------------------------n-------add start turns compliance check here?
Trigger LeaderDefiedReset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait LeaderDefied = 4
          and I_EventCounter stilldefy = 0

    Affects LeaderDefiedReset  5  Chance  100 
    Affects LeaderDefied  1  Chance  100 

;Resets leaderdefied prior to readding each turn. for all gens
;------------------------------------------
Trigger LeaderDefiedReset2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait LeaderDefied = 3
          and I_EventCounter stilldefy = 0

    Affects LeaderDefiedReset  4  Chance  100 
    Affects LeaderDefied  1  Chance  100 

;Resets leaderdefied prior to readding each turn. for all gens
;------------------------------------------
Trigger LeaderDefiedReset3
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait LeaderDefied = 2
          and I_EventCounter stilldefy = 0

    Affects LeaderDefiedReset  3  Chance  100 
    Affects LeaderDefied  1  Chance  100 

;Resets leaderdefied prior to readding each turn. for all gens
;------------------------------------------
Trigger LeaderDefiedReset4
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and Trait LeaderDefied = 1
          and I_EventCounter stilldefy = 0

    Affects LeaderDefiedReset  2  Chance  100 
    Affects LeaderDefied  1  Chance  100 

;Resets leaderdefied prior to readding each turn. for all gens
;------------------------------------------
;Kings Authority Leveller
;------------------------------------------
Trigger Kings_Authority_Leveller1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Attribute Authority >= 7

    Affects SuppressAuthority  4  Chance  100

;------------------------------------------
Trigger Kings_Authority_Leveller2
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Attribute Authority >= 5

    Affects SuppressAuthority  2  Chance  100

;------------------------------------------
Trigger Kings_Authority_Leveller3
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Attribute Authority >= 4

    Affects SuppressAuthority  1  Chance  100

;above 3 triggers reduce authority to 3 from a max of 10, authority above 10 stays relatively larger. 11=4, 12=5 etc
;------------------------------------------
; Leader Defied 
;------------------------------------------
; Attacking Against Orders
;------------------------------------------
Trigger LeaderDefiedByBattle0
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority < 1
          and Trait LeaderDefied = 0
          and I_EventCounter battledefy = 1

    Affects LeaderDefied  1  Chance  100 

;Effect on the leader when Gens defy orders. levels only vary to deal with diff auth, effectively only 1 level
;------------------------------------------
Trigger LeaderDefiedByBattle1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority >= 3
          and Trait LeaderDefied = 0
          and I_EventCounter battledefy = 1

    Affects LeaderDefied  4  Chance  100 

;Effect on the leader when Gens defy orders. This trait previously reset.brings 3 auth to 0, > 3 to 3 less
;------------------------------------------
Trigger LeaderDefiedByBattle2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority = 2
          and Trait LeaderDefied = 0
          and I_EventCounter battledefy = 1

    Affects LeaderDefied  3  Chance  100 

;Effect on the leader when Gens defy orders. brings 2 auth to 0
;------------------------------------------
Trigger LeaderDefiedByBattle3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority = 1
          and Trait LeaderDefied = 0
          and I_EventCounter battledefy = 1

    Affects LeaderDefied  2  Chance  100 

;Effect on the leader when Gens defy orders. brings 1 auth to 0
;------------------------------------------
; Defying summons or banishment Orders FL
;------------------------------------------
Trigger LeaderStillDefiedByBattle0
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority < 1
          and Trait LeaderDefied = 0
          and I_EventCounter stilldefy = 1

    Affects LeaderDefied  1  Chance  100 

;Effect on the leader when Gens defy orders. levels only vary to deal with diff auth, effectively only 1 level
;------------------------------------------
Trigger LeaderStillDefiedByBattle1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority >= 3
          and Trait LeaderDefied = 0
          and I_EventCounter stilldefy = 1

    Affects LeaderDefied  4  Chance  100 

;Effect on the leader when Gens defy orders. This trait previously reset.brings 3 auth to 0, > 3 to 3 less
;------------------------------------------
Trigger LeaderStillDefiedByBattle2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority = 2
          and Trait LeaderDefied = 0
          and I_EventCounter stilldefy = 1

    Affects LeaderDefied  3  Chance  100 

;Effect on the leader when Gens defy orders. brings 2 auth to 0
;------------------------------------------
Trigger LeaderStillDefiedByBattle3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsFactionLeader
          and Attribute Authority = 1
          and Trait LeaderDefied = 0
          and I_EventCounter stilldefy = 1

    Affects LeaderDefied  2  Chance  100 

;Effect on the leader when Gens defy orders. brings 1 auth to 0
;------------------------------------------
;  Defying summons or banishment Orders for non FL Gens
;------------------------------------------
Trigger LeaderDefiedByBattleDisloyalGensAffected
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait LeaderDefied = 0
          and FactionLeaderTrait LeaderDefied >= 1
          and Attribute Loyalty <= 2

    Affects LeaderDefied  1  Chance  100 

;Effect on the other generals when Gens defy orders.Gens use level 1 only. This trait previously reset. Two or less Loyalty
;------------------------------------------
Trigger LeaderDefiedByBattleAllOffenderGensAffected2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait LeaderDefied = 0
          and FactionLeaderTrait LeaderDefied >= 1
          and Trait DefiedOrders > 0

    Affects LeaderDefied  1  Chance  100 

;Effect on the other generals when Gens defy orders.Gens use level 1 only. This trait previously reset. Previous & Current Offenders
;------------------------------------------
;------------------------------------------
; Reckoner1 TCosts to TWealth for any end turn cost section
; (Moves TreasuryCosts over to TreasuryWealths in 9s) (up to 10,800 moved)
;------------------------------------------
;------------------------------------------
Trigger TCostReckoner1x1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent treasurycost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x7
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x8
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x9
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x10
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x11
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent cost exceeding 9
;------------------------------------------
Trigger TCostReckoner1x12
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait TreasuryCost = 9

    Affects TCReset  10  Chance  100 
    Affects TreasuryCost  1  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

;required after any 'whentotest'to prevent treasury cost exceeding 9
;------------------------------------------
; EXPENSES (for supplies, mercenary hire) (recruitment now separate)
;------------------------------------------
; Treasury too low to pay generals back
;------------------------------------------
;Trigger NoTreasuryforExpenses1
;    WhenToTest CharacterTurnEnd
;
;    Condition CharacterIsLocal
;          and IsGeneral
;          and Trait HasWarchest = 1
;          and Trait Cost = 1
;          and Treasury < 100
;
;    Affects Cost -1  Chance  100 
;
; Use triggers like this etc to prevent costs being reclaimed. Script would require changes too.
; or use similar to "expenses not claimed section" further down.
;------------------------------------------
; Reclaiming Expenses for all Recruitment Cost Authorised Generals (FL, WCs, Pro Trainers)
; ( Cost is for supplies and Mercenary hire only. Needs to cover about 10,000, covers 12,200)
;------------------------------------------
Trigger ExpensesClaimed1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 

; reclaims costs over 9 from treasury wealth as gen will be paying with own money.
; Treasury already paid, now add total turn expenses (Cost) back to personal Wealth
;------------------------------------------
Trigger ExpensesClaimed2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed7
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 

; reclaims costs over 9 from treasury wealth as gen will be paying with own money.
; Treasury already paid, now add total turn expenses (Cost) back to personal Wealth
;------------------------------------------
Trigger ExpensesClaimed8
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed9
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed10
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed11
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimed12
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost = 9

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  9  Chance  100 
    Affects Hundreds  9  Chance  100 
;------------------------------------------
Trigger ExpensesClaimedChip1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost >= 5

    Affects CostReset  6  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  5  Chance  100 
    Affects Hundreds  5  Chance  100 

;------------------------------------------
Trigger ExpensesClaimedChip2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost >= 3

    Affects CostReset  4  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  3  Chance  100 
    Affects Hundreds  3  Chance  100 

;------------------------------------------
Trigger ExpensesClaimedChip3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost >= 2

    Affects CostReset  3  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  2  Chance  100 
    Affects Hundreds  2  Chance  100 

;------------------------------------------
Trigger ExpensesClaimedChip4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait HasWarchest = 1
          and Trait Cost >= 1

    Affects CostReset  2  Chance  100 
    Affects Cost  1  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects Hundreds  1  Chance  100 

;------------------------------------------
; END SECTION Reckoner
; Needed for Additions Or Both Additions and Deductions (double reckoner)
;------------------------------------------
Trigger HundredsWealthCheckResetEnd4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1End4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2End4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
Trigger HundredsWealthCheckResetEnd4b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1End4b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2End4b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEnd4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEnd4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; When Expenses Not Claimed
; for anyone without HasWarchest (recruit auth) Cost offset vs TreasuryCost/TreasuryWealth
; works for upto about 8,300. Add more if needed.
;------------------------------------------
Trigger ExpensesNotClaimedOver9a900
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.
;------------------------------------------
Trigger ExpensesNotClaimedOver9b1800
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9c2700
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9d3600
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9e4500
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9f5400
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9g6300
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9h7200
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9i8100
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9j9000
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9k9900
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
;------------------------------------------
Trigger ExpensesNotClaimedOver9k10800
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost = 9
          and Trait TreasuryWealth > 0

    Affects CostReset  10  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 

; deducts costs over 9 from treasurywealth as gen will be paying with own money.Not FL and not WC could now be covered by haswc=0
; these triggers having to cover supplies
;------------------------------------------
Trigger ExpensesNotClaimedTwealthToTcost1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 5
          and Trait TreasuryCost < 5
          and Trait TreasuryWealth > 0

    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  9  Chance  100 

; in the event that tcost has been passed into twealth
; need to deduct cost from twealth instead
;------------------------------------------
Trigger ExpensesNotClaimed1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 5
          and Trait TreasuryCost >= 5

    Affects CostReset  6  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TCReset  6  Chance  100 
    Affects TreasuryCost  1  Chance  100 

; deducts costs from treasury costs as treasury will not be paying these costs
;------------------------------------------
Trigger ExpensesNotClaimedTwealthToTcost2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 3
          and Trait TreasuryCost < 3
          and Trait TreasuryWealth > 0

    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  9  Chance  100 

; in the event that tcost has been passed into twealth
; need to deduct cost from twealth instead
;------------------------------------------
Trigger ExpensesNotClaimed2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 3
          and Trait TreasuryCost >= 3

    Affects CostReset  4  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TCReset  4  Chance  100 
    Affects TreasuryCost  1  Chance  100 

;------------------------------------------
Trigger ExpensesNotClaimedTwealthToTcost3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 2
          and Trait TreasuryCost < 2
          and Trait TreasuryWealth > 0

    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  9  Chance  100 

; in the event that tcost has been passed into twealth
; need to deduct cost from twealth instead
;------------------------------------------
Trigger ExpensesNotClaimed3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 2
          and Trait TreasuryCost >= 2

    Affects CostReset  3  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TCReset  3  Chance  100 
    Affects TreasuryCost  1  Chance  100 

;------------------------------------------
Trigger ExpensesNotClaimedTwealthToTcost4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 1
          and Trait TreasuryCost < 1
          and Trait TreasuryWealth > 0

    Affects TWReset  2  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryCost  9  Chance  100 

; in the event that tcost has been passed into twealth
; need to deduct cost from twealth instead
;------------------------------------------
Trigger ExpensesNotClaimed4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and not IsFactionLeader
          and Trait HasWarchest = 0
;          and not HasAncType warcouncil
          and Trait Cost >= 1
          and Trait TreasuryCost >= 1

    Affects CostReset  2  Chance  100 
    Affects Cost  1  Chance  100 
    Affects TCReset  2  Chance  100 
    Affects TreasuryCost  1  Chance  100 

;------------------------------------------
; Treasury Nine Reckoner
;puts excess treasury wealth into nines
;------------------------------------------
Trigger TreasuryNine_Reckoner1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner7
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner8
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
Trigger TreasuryNine_Reckoner9
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait TreasuryWealth = 9

    Affects TWReset  10  Chance  100 
    Affects TreasuryWealth  1  Chance  100 
    Affects TreasuryNine  1  Chance  100 

;------------------------------------------
;------------------------------------------
; Test Cost Missed Removal (useful for bugcheck)
;no value for cost should remain
; if it does trigger should only trigger for gens who do not use cost.
;------------------------------------------
;------------------------------------------
Trigger CostTestShouldNotTrigger
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Cost >= 1

    Affects CostReset  2  Chance  100 
    Affects Cost  1  Chance  100 

; if this trigger fires then need to do 1 to 9 level removal.
;------------------------------------------
;------------------------------------------
; CRUSADES and JIHADS Section (donations)
;------------------------------------------
;------------------------------------------
; Crusades/Jihads deducts resets (donations)
;------------------------------------------
Trigger deductforcrusadereset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait bgrdeduct = 1
          and CharacterReligion catholic
          and not I_CrusadeInProgress

    Affects bgrdeduct -1  Chance  100

; crusade not in progress, reset bgrdeduct
;------------------------------------------
Trigger deductforcrusadereset2
    WhenToTest GeneralJoinCrusade

    Condition IsCrusade
          and CharacterReligion catholic
          and IsFactionLeader
          and CharacterIsLocal
          and Trait bgrdeduct = 1

    Affects bgrdeduct -1  Chance  100

;reset bgrdeduct if fl joins crusade for FL
;------------------------------------------
Trigger deductforcrusadereset2b
    WhenToTest GeneralJoinCrusade

    Condition IsCrusade
          and CharacterReligion catholic
          and IsFactionLeader
          and CharacterIsLocal
          and Trait ReligiousWarTax = 1

    Affects ReligiousWarTax -1  Chance  100

;reset ReligiousWarTax if fl joins crusade for FL
;------------------------------------------
Trigger deductforcrusadereset3
    WhenToTest CharacterTurnEnd

    Condition CharacterReligion catholic
          and IsGeneral
          and CharacterIsLocal
          and FactionLeaderTrait bgrdeduct = 0
          and Trait bgrdeduct = 1

    Affects bgrdeduct -1  Chance  100

;reset bgrdeduct if FL joined crusade. for Generals
;------------------------------------------
Trigger deductforcrusadereset4
    WhenToTest GeneralJoinCrusade

    Condition IsCrusade
          and CharacterReligion catholic
          and IsGeneral
          and CharacterIsLocal
          and Trait bgrdeduct = 1

    Affects bgrdeduct -1  Chance  100

;reset bgrdeduct if GENERAL joins crusade, for him only
;------------------------------------------
Trigger deductforcrusadereset5
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterReligion catholic
          and not I_CrusadeInProgress
;          and CharacterIsLocal
          and Trait bgrdeduct = 1

    Affects bgrdeduct -1  Chance  100

;removes trait at start turn if was deactivated during ai turn - just for show (removes for ai too)
;------------------------------------------
Trigger deductforcrusadereset5b
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterReligion catholic
          and not I_CrusadeInProgress
          and CharacterIsLocal
          and Trait ReligiousWarTax = 1

    Affects ReligiousWarTax -1  Chance  100

;removes trait at start turn if was deactivated during ai turn - just for show
;------------------------------------------
Trigger deductforjihadreset1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait bgrdeductislam = 1
          and CharacterReligion islam
          and not I_JihadInProgress

    Affects bgrdeductislam -1  Chance  100

;jihad not in progress reset bgrdeductislam - at end turn
;------------------------------------------
Trigger deductforjihadreset2
    WhenToTest GeneralJoinCrusade

    Condition IsJihad
          and CharacterReligion islam
          and IsFactionLeader
          and CharacterIsLocal
          and Trait bgrdeductislam = 1

    Affects bgrdeductislam -1  Chance  100

;reset bgrdeductislam for FL if FL joins jihad - instantly
;------------------------------------------
Trigger deductforjihadreset2b
    WhenToTest GeneralJoinCrusade

    Condition IsJihad
          and CharacterReligion islam
          and IsFactionLeader
          and CharacterIsLocal
          and Trait ReligiousWarTax = 1

    Affects ReligiousWarTax -1  Chance  100

;reset ReligiousWarTax if fl joins jihad for FL
;------------------------------------------
Trigger deductforjihadreset3
    WhenToTest CharacterTurnEnd

    Condition CharacterReligion islam
          and IsGeneral
          and CharacterIsLocal
          and FactionLeaderTrait bgrdeductislam = 0
          and Trait bgrdeductislam = 1

    Affects bgrdeductislam -1  Chance  100

;reset bgrdeductislam if fl joins jihad. for generals - at end turn
;------------------------------------------
Trigger deductforjihadreset4
    WhenToTest GeneralJoinCrusade

    Condition IsJihad
          and CharacterReligion islam
          and IsGeneral
          and CharacterIsLocal
          and Trait bgrdeductislam = 1

    Affects bgrdeductislam -1  Chance  100

;reset bgrdeductislam if general joins jihad
;------------------------------------------
Trigger deductforjihadreset5
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterReligion islam
          and not I_JihadInProgress
          and CharacterIsLocal
          and Trait bgrdeductislam = 1

    Affects bgrdeductislam -1  Chance  100

;removes trait at start turn if was deactivated during ai turn - just for show as will be done at end turn if not here.
;------------------------------------------
Trigger deductforjihadreset5b
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterReligion islam
          and not I_JihadInProgress
          and CharacterIsLocal
          and Trait ReligiousWarTax = 1

    Affects ReligiousWarTax -1  Chance  100

;removes trait at start turn if was deactivated during ai turn - just for show
;------------------------------------------
Trigger RemoveReligiousWarTaxAI
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and not CharacterIsLocal
          and Trait ReligiousWarTax = 1

    Affects ReligiousWarTax -1  Chance  100

;removes trait at start turn if was bribed to ai or rebelled
;------------------------------------------
;deduct (donations) section for crusades and jihads
;------------------------------------------
Trigger deductforcrusadeTaxFL1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterReligion catholic
          and I_CrusadeInProgress
          and CharacterIsLocal
          and Trait bgrdeduct = 0
          and not IsOnCrusade
          and not FactionExcommunicated

    Affects ReligiousWarTax  1  Chance  100
    Affects bgrdeduct  1  Chance  100

;sets deduct if crusade on and FL is not, FL donates 400
;------------------------------------------
Trigger deductforcrusadeTaxFL1b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait bgrdeduct = 1

    Affects Tax  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusHundreds  4  Chance  100 

;sets taxes if crusade on and FL is not, FL donates 400
;------------------------------------------
Trigger deductforcrusadeTaxGen2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterReligion catholic
          and I_CrusadeInProgress
          and CharacterIsLocal
          and Trait bgrdeduct = 0
          and FactionLeaderTrait bgrdeduct = 1
          and not IsOnCrusade
          and not FactionExcommunicated
          and not Trait DefiedOrders = 4

    Affects bgrdeduct  1  Chance  100

;sets deduct if crusade on and general is not and FL is already donating, setting the precedent
;------------------------------------------
Trigger deductforcrusadeTaxGen2b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and Trait bgrdeduct = 1

    Affects Tax  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusHundreds  4  Chance  100 

;sets tax if crusade on and general is not and FL is already donating, setting the precedent
;------------------------------------------
Trigger deductjoinscrusade
    WhenToTest GeneralJoinCrusade

    Condition IsCrusade
          and IsGeneral
          and CharacterReligion catholic
          and CharacterIsLocal

    Affects crusadecost  1  Chance  100
    Affects Poverty  51  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusThousands  5  Chance  100 

;cost of joining a crusade per army = 5000 personal, 5000 faction, one off charge.
;faction always pays as donations are received factionwide
;------------------------------------------
Trigger deductforjihadTaxFL1
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterReligion islam
          and I_JihadInProgress
          and CharacterIsLocal
          and not Trait bgrdeductislam = 1
          and not IsOnJihad

    Affects ReligiousWarTax  1  Chance  100
    Affects bgrdeductislam  1  Chance  100

;fl
;------------------------------------------
Trigger deductforjihadTaxFL1b
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
          and CharacterIsLocal
          and Trait bgrdeductislam = 1

    Affects Tax  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusHundreds  4  Chance  100 

;fl
;------------------------------------------
Trigger deductforjihadTaxGen2
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterReligion islam
          and I_JihadInProgress
          and CharacterIsLocal
          and Trait bgrdeductislam = 0
          and FactionLeaderTrait bgrdeductislam = 1
          and not IsOnJihad
          and not Trait DefiedOrders = 4

    Affects bgrdeductislam  1  Chance  100

;gen
;------------------------------------------
Trigger deductforjihadTaxGen2b
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and not IsFactionLeader
          and CharacterIsLocal
          and Trait bgrdeductislam = 1

    Affects Tax  4  Chance  100
    Affects Poverty  5  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusHundreds  4  Chance  100 

;sets tax if crusade on and general is not and FL is already donating, setting the precedent
;------------------------------------------
Trigger deductjoinsjihad
    WhenToTest GeneralJoinCrusade

    Condition IsJihad
          and IsGeneral
          and CharacterReligion islam
          and CharacterIsLocal

    Affects jihadcost  1  Chance  100
    Affects Poverty  51  Chance  100
    Affects Wealth  1  Chance  100
    Affects MinusThousands  5  Chance  100 

;cost of joining a jihad per army = 5000 personal, 5000 faction, one off charge.
;------------------------------------------
; Personal Crusade/Jihad Cost Reset
;------------------------------------------
Trigger deductforcrusade2reset
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait crusadecost = 1

    Affects crusadecost  -1  Chance  100

;all - removes one off crusade joining fee notifier trait
;------------------------------------------
Trigger deductforjihad2reset
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and Trait jihadcost = 1

    Affects jihadcost  -1  Chance  100

;all
;------------------------------------------
; WEALTH TAX Part 2 (tax generals)
;------------------------------------------
Trigger WealthTaxesPaid1Estate
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and not IsFactionLeader
        and CharacterIsLocal
        and FactionLeaderTrait WealthTax = 1
        and Trait Estates = 2
        and Trait Tax <= 7
        and not Trait DefiedOrders = 4
        and not FactionLeaderTrait ReinsOfPower = 1

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;does not affect banished gens. for 1 estate held. This tax requires the last 2 points of Tax( 8 & 9) dont let other taxes use.
; other taxes must not pass total tax of 7
;------------------------------------------
Trigger WealthTaxesPaid2Estates
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and not IsFactionLeader
        and CharacterIsLocal
        and FactionLeaderTrait WealthTax = 1
        and Trait Estates = 3
        and Trait Tax <= 7
        and not Trait DefiedOrders = 4
        and not FactionLeaderTrait ReinsOfPower = 1

    Affects Tax  2  Chance  100 
    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  2  Chance  100 
;does not affect banished gens. for 2 estates held
;------------------------------------------
;------------------------------------------
Trigger WealthTaxesPaid1Estate_Rich
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and not IsFactionLeader
        and CharacterIsLocal
        and FactionLeaderTrait WealthTax = 1
        and Trait Estates = 2
        and Trait Tax <= 7
        and not Trait DefiedOrders = 4
        and not FactionLeaderTrait ReinsOfPower = 1
        and Trait Wealth >= 8
        and FactionLeaderTrait FactionZeal <= 2

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;does not affect banished gens. for 1 estate held. This tax requires the last 2 points of Tax( 8 & 9) dont let other taxes use.
; other taxes must not pass total tax of 7
;------------------------------------------
Trigger WealthTaxesPaid2Estates_Rich
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and not IsFactionLeader
        and CharacterIsLocal
        and FactionLeaderTrait WealthTax = 1
        and Trait Estates = 3
        and Trait Tax <= 7
        and not Trait DefiedOrders = 4
        and not FactionLeaderTrait ReinsOfPower = 1
        and Trait Wealth >= 8
        and Trait CentralisedPower <= 2
        and FactionLeaderTrait FactionZeal <= 2

    Affects Tax  2  Chance  100 
    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  2  Chance  100 
;does not affect banished gens. for 2 estates held
;------------------------------------------
Trigger WealthTaxesPaid1EstateWeakGrip
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and not IsFactionLeader
        and CharacterIsLocal
        and FactionLeaderTrait WealthTax = 1
        and Trait Estates = 2
        and Trait Tax <= 7
        and not Trait DefiedOrders = 4
        and FactionLeaderTrait ReinsOfPower = 1
        and Attribute Loyalty >= 2

    Affects Tax  1  Chance  100 
    Affects Poverty  2  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  1  Chance  100 
;does not affect banished gens. for 1 estate held. This tax requires the last 2 points of Tax( 8 & 9) dont let other taxes use.
; other taxes must not pass total tax of 7
; only loyal gens pay if leaders grip is weak
;------------------------------------------
Trigger WealthTaxesPaid2EstatesWeakGrip
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
        and not IsFactionLeader
        and CharacterIsLocal
        and FactionLeaderTrait WealthTax = 1
        and Trait Estates = 3
        and Trait Tax <= 7
        and not Trait DefiedOrders = 4
        and FactionLeaderTrait ReinsOfPower = 1
        and Attribute Loyalty >= 2

    Affects Tax  2  Chance  100 
    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  2  Chance  100 
;does not affect banished gens. for 2 estates held
; only loyal gens pay if leaders grip is weak
;------------------------------------------
; END SECTION 3
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEnd3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1End3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2End3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEnd3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEnd3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
;------------------------------------------
;Trigger testdeduct
;    WhenToTest CharacterTurnStart
;
;    Condition IsFactionLeader
;          and I_TurnNumber = 2
;          and CharacterIsLocal
;          and not Trait bgrdeduct = 1
;
;    Affects bgrdeduct  1  Chance  100
;
;------------------------------------------
Trigger NewLeaderPardonsGensReset
    WhenToTest CharacterTurnEnd

    Condition Trait Pardon = 1

    Affects PardonReset  2  Chance  100 
    Affects Pardon  1  Chance  100 

;------------------------------------------
;
; Repayment Scheme
; Interest Payments
; Estates Forfeit and Sold
; Banishment for Vagabonds
; Cancel Debt
; Transfer Negative Wealth to Debt
;  (can escape banishment by being on a crusade when in debt & no money & estate confiscated)
;
;------------------------------------------
;------------------------------------------
;------------------------------------------
; Repayment Sceme
;------------------------------------------
;------------------------------------------
Trigger Repayments
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt > 0
          and Trait Wealth >= 8
;*          and Trait Thousands >= 4

    Affects Poverty  21  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects DebtReset  2  Chance  100 
    Affects Debt  1  Chance  100 
    Affects MinusThousands  2  Chance  100 

;transfers 2000 wealth to decrease debt if wealth over adequate (rich or more) at 2000/turn
;Thousands would require min of 4000. * reckoner needed pre this section for accurate total
;------------------------------------------
;------------------------------------------
; Interest Payments---------------------------should come before debt (so it comes the turn after debt gained)
;------------------------------------------
;------------------------------------------
Trigger InterestPayments1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt >= 3

    Affects Poverty  7  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  6  Chance  100 

;interest at 10%/200 per debt level: 600
;------------------------------------------
Trigger InterestPayments2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt >= 6

    Affects Poverty  7  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  6  Chance  100 

;interest at 10%/200 per debt level: 600
;------------------------------------------
Trigger InterestPayments3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt = 9

    Affects Poverty  7  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  6  Chance  100 

;interest at 10%/200 per debt level: 600
;------------------------------------------
Trigger InterestPayments4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt > 0
          and not Trait Debt = 3
          and not Trait Debt = 6
          and not Trait Debt = 9

    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  2  Chance  100 

;interest at 10%/200 per debt level: 200
;------------------------------------------
Trigger InterestPayments5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt > 0
          and not Trait Debt = 1
          and not Trait Debt = 3
          and not Trait Debt = 4
          and not Trait Debt = 6
          and not Trait Debt = 7
          and not Trait Debt = 9

    Affects Poverty  3  Chance  100 
    Affects Wealth  1  Chance  100 
    Affects MinusHundreds  2  Chance  100 

;interest at 10%/200 per debt level: 200. would need 9 of these triggers but did a CHIPAWAY in 5.
;------------------------------------------
; END SECTION 2
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions (2 repeats to cope with 18 Minus hundreds possible in previous Interest section)
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEnd2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1End2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2End2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEnd2b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1End2b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2End2b
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEnd2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEnd2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
;------------------------------------------
; Estates Forfeit and Sold
;------------------------------------------
;------------------------------------------
Trigger EstatePurchaseReset
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait EstatePurchased = 1

    Affects EstatePurchasedReset  2  Chance  100 
    Affects EstatePurchased  1  Chance  100 
;------------------------------------------
Trigger EstateForfeitAndSold
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth <= 4
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait Estates >= 2
          and Trait Debt > 0

    Affects EstatesReset  2  Chance  100 
    Affects Estates  1  Chance  100 
    Affects EstatePurchased  1  Chance  100 

;put after all payments made, but before borrowing more money.
;moneylenders sieze estates, which Treasury now purchases back for faction. -2,000 to -6000
;if any debt already + no money + has estates = forfeit estates + Treasury buys back for -2000 to -6000
;------------------------------------------
;------------------------------------------
; Banishment for Vagabonds
;
; (WCs & Crusaders Protected From Banishment via debt.)
;------------------------------------------
;------------------------------------------
Trigger VagabondBanished1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and not IsFactionLeader
          and not HasAncType warcouncil
          and Trait Estates = 1
          and Trait Debt > 0
          and Trait Wealth <= 4
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait DefiedOrders = 0
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  4  Chance  100 

;banished for borrowing money that he cannot pay the interest on due to no estates & negative wealth, warning is in "no estates"
;cannot borrow money again until has an estate so no further danger of banishment until then
;needs doing for each level of DO
; estates 1 is no estates
; HunThou hopefully catches 0 wealth or less(in antitrait)
;------------------------------------------
Trigger VagabondBanished2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and not IsFactionLeader
          and not HasAncType warcouncil
          and Trait Estates = 1
          and Trait Debt > 0
          and Trait Wealth <= 4
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait DefiedOrders = 1
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  3  Chance  100 
;------------------------------------------
Trigger VagabondBanished3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and not IsFactionLeader
          and not HasAncType warcouncil
          and Trait Estates = 1
          and Trait Debt > 0
          and Trait Wealth <= 4
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait DefiedOrders = 2
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  2  Chance  100 
;------------------------------------------
Trigger VagabondBanished4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and not IsFactionLeader
          and not HasAncType warcouncil
          and Trait Estates = 1
          and Trait Debt > 0
          and Trait Wealth <= 4
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait DefiedOrders = 3
          and not IsOnCrusade
          and not IsOnJihad

    Affects DefiedOrders  1  Chance  100 
;------------------------------------------
;------------------------------------------
; Cancel Debt (due to assets siezed)
;------------------------------------------
;------------------------------------------
Trigger DebtCancelled1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt >= 5
          and Trait EstatePurchased = 1

    Affects DebtReset  6  Chance  100 
    Affects Debt  1  Chance  100 

;removes 5 debt. Chipaway triggers.
;------------------------------------------
Trigger DebtCancelled2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt >= 3
          and Trait EstatePurchased = 1

    Affects DebtReset  4  Chance  100 
    Affects Debt  1  Chance  100 

;removes 3 debt
;------------------------------------------
Trigger DebtCancelled3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Debt >= 2
          and Trait EstatePurchased = 1

    Affects DebtReset  3  Chance  100 
    Affects Debt  1  Chance  100 

;removes 2 debt
;------------------------------------------
Trigger DebtCancelled4
    WhenToTest CharacterTurnEnd

    Condition Trait Debt >= 1
          and Trait EstatePurchased = 1

    Affects DebtReset  2  Chance  100 
    Affects Debt  1  Chance  100 

;removes 1 debt (for ai as well will remove 1 per turn if was bribed over)
;------------------------------------------
;------------------------------------------
; Transfer Negative Wealth to Debt (Borrowed) (up to 8000/turn)
;------------------------------------------
; (cannot go into debt again after siezure unless has more estates. Will still have some negative wealth)
;------------------------------------------
Trigger WealthToDebt1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth < 5
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait Estates > 1

    Affects Wealth  20  Chance  100 
    Affects Debt  1  Chance  100 
    Affects Thousands  2  Chance  100 

;transfers negative wealth to debt
;------------------------------------------
;Trigger WealthToDebt1a
;    WhenToTest CharacterTurnEnd
;
;    Condition CharacterIsLocal
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
;          and Trait Estates > 1
;
;    Affects Wealth  20  Chance  100 
;    Affects Debt  1  Chance  100 
;    Affects Thousands  2  Chance  100 
;
;transfers negative wealth to debt. Example triggers to simulate "or" for use if wealth is replaced by HunThou
; can't pickup debt with single trigger so also picks up 0 money. (would need 3 to catch all -money, 1 for -hun, 1 for -thou, 1 for -hun and -thou)
;------------------------------------------
Trigger WealthToDebt2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth < 5
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait Estates > 1

    Affects Wealth  20  Chance  100 
    Affects Debt  1  Chance  100 
    Affects Thousands  2  Chance  100 

;transfers negative wealth to debt
;------------------------------------------
Trigger WealthToDebt3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth < 5
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait Estates > 1

    Affects Wealth  20  Chance  100 
    Affects Debt  1  Chance  100 
    Affects Thousands  2  Chance  100 

;transfers negative wealth to debt
;------------------------------------------
Trigger WealthToDebt4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth < 5
;*          and Trait Thousands = 0
;*          and Trait Hundreds = 0;*************will this work?
          and Trait Estates > 1

    Affects Wealth  20  Chance  100 
    Affects Debt  1  Chance  100 
    Affects Thousands  2  Chance  100 

;transfers negative wealth to debt
;------------------------------------------
; Scutage (part 2. must go at end of end turns)
;------------------------------------------
Trigger Is_Ready_For_Scutage_Reset
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
;        and CharacterIsLocal
        and Trait ReadyForScutage = 1

    Affects ReadyForScutageReset  2  Chance  100 
    Affects ReadyForScutage  1  Chance  100 

;------------------------------------------
Trigger Is_Ready_For_Scutage
    WhenToTest CharacterTurnEnd

    Condition IsFactionLeader
        and CharacterIsLocal
        and Trait ExpeditionTaxOrder = 0
        and Trait CentralisedPower > 1
        and Trait ReadyForScutage = 0

    Affects ReadyForScutage  1  Chance  100 

;is able to enact scutage
;------------------------------------------
;Trigger AttackAgainstOrdersDOTest
;    WhenToTest CharacterTurnEnd
;
;    Condition CharacterIsLocal
;	and IsGeneral
;	and not IsFactionLeader
;	and not HasAncType warcouncil
;	and InEnemyLands
;        and Trait DefiedOrders = 0
;;          and not IsOnCrusade
;;          and not IsOnJihad
;                and I_TurnNumber <= 3
;
;    Affects DefiedOrders  4  Chance  100
;
;; test, gives DO4 to any non-WC gen with no criminal record if in enemy lands TEST ONLY. REMOVE THIS!!!!!!!!!!!!!!!!1
;------------------------------------------
;Trigger AttackAgainstOrdersDOTest2
;    WhenToTest CharacterTurnEnd
;
;    Condition CharacterIsLocal
;	and IsGeneral
;;	and InEnemyLands
;        and Trait LeaderDefied = 0
;;          and not IsOnCrusade
;;          and not IsOnJihad
;
;    Affects LeaderDefied  4  Chance  100
;
;; test, gives DO4 to any non-WC gen with no criminal record if in enemy lands TEST ONLY. REMOVE THIS!!!!!!!!!!!!!!!!1
;;------------------------------------------
; START SECTION
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckReset
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions
;------------------------------------------
Trigger MinusHundredsWealthCheckReset
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousands
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousands
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; MERC HIRE SECTION
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions
;------------------------------------------
Trigger MinusHundredsWealthCheckResetHM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1HM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2HM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousands1HM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsFromThousands2HM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsFromThousands3HM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsHM
    WhenToTest HireMercenaries

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; RANSOM SECTION
;------------------------------------------
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckResetR
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1R
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition CharacterIsLocal
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2R
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsR
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsR
    WhenToTest GeneralPrisonersRansomedCaptor

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; CONQUEST SECTION
;------------------------------------------
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckResetC
    WhenToTest GeneralCaptureSettlement

    Condition Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1C
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2C
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsC
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsC
    WhenToTest GeneralCaptureSettlement

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; SACK SECTION
;------------------------------------------
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckResetSack
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1Sack
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2Sack
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsSack
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsSack
    WhenToTest SackSettlement

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; GENERAL MARRIES SECTION
;------------------------------------------
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckResetGM
    WhenToTest CharacterMarries

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1GM
    WhenToTest CharacterMarries

    Condition CharacterIsLocal
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2GM
    WhenToTest CharacterMarries

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsGM
    WhenToTest CharacterMarries

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsGM
    WhenToTest CharacterMarries

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; GENERAL MARRIES PRINCESS SECTION
;------------------------------------------
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckResetGMP
    WhenToTest CharacterMarriesPrincess

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1GMP
    WhenToTest CharacterMarriesPrincess

    Condition CharacterIsLocal
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2GMP
    WhenToTest CharacterMarriesPrincess

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsGMP
    WhenToTest CharacterMarriesPrincess

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsGMP
    WhenToTest CharacterMarriesPrincess

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; UNITS TRAINED SECTION
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions
;------------------------------------------
Trigger MinusHundredsWealthCheckResetTrained
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1Trained
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2Trained
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsTrained
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsTrained
    WhenToTest GovernorUnitTrained

    Condition CharacterIsLocal
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
; END SECTION
; Needed for Additions Or Both Additions and Deductions
;------------------------------------------
Trigger HundredsWealthCheckResetEnd
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for Hundreds
;------------------------------------------
Trigger HundredsReckoner1End
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds = 9

    Affects Thousands  1  Chance  100 
    Affects MinusHundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger HundredsReckoner2End
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait MinusHundreds = 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; Needed for Deductions Or Both Additions and Deductions
;------------------------------------------
Trigger MinusHundredsWealthCheckResetEnd
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1

    Affects WealthCheck -1  Chance  100 
; for MinusHundreds
;------------------------------------------
Trigger MinusHundredsReckoner1End
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds = 9

    Affects MinusThousands  1  Chance  100 
    Affects Hundreds  10  Chance  100 
    Affects WealthCheck  1  Chance  100 
;------------------------------------------
Trigger MinusHundredsReckoner2End
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait WealthCheck = 1
          and Trait Hundreds = 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
    Affects WealthCheck -1  Chance  100 
;------------------------------------------
; If Thousands + & Hundreds -
;------------------------------------------
Trigger MinusHundredsFromThousandsEnd
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds >= 1
          and Trait Thousands >= 1

    Affects Hundreds  10  Chance  100 
    Affects MinusThousands  1  Chance  100 
;------------------------------------------
; If Thousands - & Hundreds +
;------------------------------------------
Trigger HundredsFromMinusThousandsEnd
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds >= 1
          and Trait MinusThousands >= 1

    Affects MinusHundreds  10  Chance  100 
    Affects Thousands  1  Chance  100 
;------------------------------------------
Trigger TraitsListSorter1Start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait Wealth > 0

;    Affects DefiedOrdersReset  5  Chance  100 
;    Affects DefiedOrders  5  Chance  100 
    Affects Poverty  300  Chance  100 
    Affects Wealth  300  Chance  100 
    Affects TaxEffectReset  5  Chance  100 
    Affects TaxEffect  5  Chance  100 
    Affects TaxReset  30  Chance  100 
    Affects Tax  30  Chance  100 
    Affects EarnReset  30  Chance  100 
    Affects Earn  30  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter2Start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait Wealth > 0

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  2  Chance  100 
    Affects FinesReset  30  Chance  100 
    Affects Fines  30  Chance  100 
    Affects CostReset  40  Chance  100 
    Affects Cost  40  Chance  100 
    Affects MilitaryExpensesReset  40  Chance  100 
    Affects MilitaryExpenses  40  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter2StartME
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait Wealth > 0

    Affects MilitaryExpenses1Reset  20  Chance  100 
    Affects MilitaryExpenses1  20  Chance  100 
    Affects MilitaryExpenses2Reset  20  Chance  100 
    Affects MilitaryExpenses2  20  Chance  100 
    Affects MilitaryExpenses3Reset  20  Chance  100 
    Affects MilitaryExpenses3  20  Chance  100 
    Affects MilitaryExpenses4Reset  20  Chance  100 
    Affects MilitaryExpenses4  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter2bStart
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and Trait Supplies > 0

    Affects GeneralZealReset  10  Chance  100 
    Affects GeneralZeal  10  Chance  100 
    Affects ForageIncrementReset  10  Chance  100 
    Affects ForageIncrement  10  Chance  100 
    Affects TIFReset  10  Chance  100 
    Affects TimeInField  10  Chance  100 
    Affects SupplyIncrementReset  10  Chance  100 
    Affects SupplyIncrement  10  Chance  100 
    Affects SuppliesAdded  7  Chance  100 
    Affects Supplies  7  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
; Orders Section (orders may sometimes be seen by those who they do not apply to too)
;------------------------------------------
Trigger OrdersReset1Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Orders >= 3

    Affects Orders -2  Chance  100

;removes from all gens including a new FL
;------------------------------------------
Trigger OrdersReset2Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Orders >= 2

    Affects Orders -2  Chance  100

;removes from all gens including a new FL
;------------------------------------------
Trigger OrdersReset3Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Orders >= 1

    Affects Orders -1  Chance  100

;removes from all gens including a new FL
;------------------------------------------
Trigger Orders1Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
          and FactionLeaderTrait CentralisedPower = 1

    Affects Orders  1  Chance  100
;------------------------------------------
Trigger Orders2Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
;          and not HasAncType warcouncil
          and Trait HasWarchest = 0
          and FactionLeaderTrait CentralisedPower = 2

    Affects Orders  2  Chance  100

; orders to all except king, Warchest holders (text is specific)
;------------------------------------------
Trigger Orders3Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
;          and not HasAncType warcouncil
;          and Trait HasWarchest = 0
          and FactionLeaderTrait CentralisedPower = 3

    Affects Orders  3  Chance  100

; NEW orders to all but king
;------------------------------------------
Trigger Orders4newStart
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and not IsFactionLeader
          and FactionLeaderTrait CentralisedPower = 4

    Affects Orders  4  Chance  100

; NEW orders to all but king
;------------------------------------------
; Traits List Sorters for HunThou Start
;------------------------------------------
Trigger TraitsListSorter3Start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Thousands > 0

    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter4Start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusThousands > 0

    Affects Thousands  20  Chance  100 
    Affects MinusThousands  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter5Start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds > 0

    Affects MinusHundreds  20  Chance  100 
    Affects Hundreds  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter6Start
    WhenToTest CharacterTurnStart

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds > 0

    Affects Hundreds  20  Chance  100 
    Affects MinusHundreds  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
; Poor Wealth Prevents Recruitment JrWC
;------------------------------------------
Trigger GivesCentralPowerEffect1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait HasWarchest = 0
          and FactionLeaderTrait CentralisedPower = 1
          and Trait Wealth >= 7
;*          and Trait Thousands >= 2
          and not Trait JrWarCouncillor = 2

    Affects CentralisedPowerEffect  1  Chance  100

;done for wealth debt. Gens must be adequate or above to recruit 3rd level units
; (Old - WC always retains ability to recruit)-----------allows universal recruitment for logens of high units...CAUTION will GIVE CP EFFECT to late WC(prior to warcouncil anc)
; New -  All gens now boosted with CPeffect when NOT HasWarchest trait AND warchest Anc.(needs 2 trigs)
;------------------------------------------
;Trigger GivesCentralPowerEffect1b
;    WhenToTest CharacterTurnEnd
;
;    Condition IsGeneral
;          and CharacterIsLocal
;          and Trait CentralisedPowerEffect = 0
;          and not HasAncType warchest
;          and FactionLeaderTrait CentralisedPower = 1
;          and Trait Wealth >= 7
;;*          and Trait Thousands >= 2
;
;    Affects CentralisedPowerEffect  1  Chance  100
;
; Don't think this trigger is required any longer because haswarchest trigger above covers it.
;------------------------------------------
Trigger JrWC_Off_WealthLow
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait JrWCOff < 1
          and Trait Wealth <= 6
          and Trait RecruitLimit >= 1

    Affects JrWCOff  1  Chance  100

; set jrwcoff if too poor
;------------------------------------------
Trigger StopRecruitPoorOrLessNoAuth
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait StopR = 0
          and Trait Wealth <= 6
;*          and Trait Thousands <= 1
          and Trait HasWarchest = 0

    Affects StopR  1  Chance  100

;stop recruiting if poor (2000) or less. exempt expense claimants
; for thousands could be any thing up to 1,900 *
;------------------------------------------
; Recruitment Summary Traits
; actual recruitment ability is set at end of last turn
; and put into effect after character end turn
; can be wrong as may show recruit ability at start update due to wealth gained during ai turn (ransoms etc)
; yet may not be able to recruit due to previous turn effects
;------------------------------------------
Trigger Recruitment_desc_reset1Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentAbility > 0

    Affects RecruitmentAbility -1  Chance 100

;------------------------------------------
Trigger Recruitment_desc_reset2Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentAbility > 0

    Affects RecruitmentAbility -1  Chance 100

;------------------------------------------
Trigger Recruitment_desc_reset3Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Trait RecruitmentAbility > 0

    Affects RecruitmentAbility -1  Chance 100

;------------------------------------------
Trigger Recruitment_Descriptions1Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Attribute Charm = 10

    Affects RecruitmentAbility  1  Chance 100

;------------------------------------------
Trigger Recruitment_Descriptions2Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Attribute Charm <= 9
          and Attribute Charm >= 5

    Affects RecruitmentAbility  2  Chance 100

;------------------------------------------
Trigger Recruitment_Descriptions3Start
    WhenToTest CharacterTurnStart

    Condition IsGeneral
          and CharacterIsLocal
          and Attribute Charm <= 4

    Affects RecruitmentAbility  3  Chance 100

;------------------------------------------
; End Turn Description Traits and Sorters
;------------------------------------------
Trigger TraitsListSorter1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth > 0

;    Affects DefiedOrdersReset  5  Chance  100 
;    Affects DefiedOrders  5  Chance  100 
    Affects Poverty  300  Chance  100 
    Affects Wealth  300  Chance  100 
    Affects EarnReset  30  Chance  100 
    Affects Earn  30  Chance  100 
    Affects TaxEffectReset  5  Chance  100 
    Affects TaxEffect  5  Chance  100 
    Affects TaxReset  30  Chance  100 
    Affects Tax  30  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter2
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and Trait Wealth > 0

    Affects ExpeditionTaxReset  2  Chance  100 
    Affects ExpeditionTax  2  Chance  100 
    Affects FinesReset  30  Chance  100 
    Affects Fines  30  Chance  100 
    Affects CostReset  40  Chance  100 
    Affects Cost  40  Chance  100 
    Affects MilitaryExpensesReset  40  Chance  100 
    Affects MilitaryExpenses  40  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
; Traits List Sorters for HunThou
;------------------------------------------
Trigger TraitsListSorter3
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Thousands > 0

    Affects MinusThousands  20  Chance  100 
    Affects Thousands  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter4
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusThousands > 0

    Affects Thousands  20  Chance  100 
    Affects MinusThousands  20  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter5
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Hundreds > 0

    Affects MinusHundreds  10  Chance  100 
    Affects Hundreds  10  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
Trigger TraitsListSorter6
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait MinusHundreds > 0

    Affects Hundreds  10  Chance  100 
    Affects MinusHundreds  10  Chance  100 

;moves traits to end of list, in order.
;------------------------------------------
; BGRIV NOTES
;    WhenToTest CharacterTurnStart**Done
;    WhenToTest OfferedForAdoption-- new gens so no reckoner needed
;    WhenToTest OfferedForMarriage-- new gens so no reckoner needed
;    WhenToTest CharacterComesOfAge-- new gens so no reckoner needed
;    WhenToTest HireMercenaries**Done
;    WhenToTest GeneralPrisonersRansomedCaptor**Done
;    WhenToTest GeneralCaptureSettlement**Done
;    WhenToTest SackSettlement**Done
;    WhenToTest LesserGeneralOfferedForAdoption-- new gens only, so no reckoner needed
;    WhenToTest CharacterMarriesPrincess**Done
;    WhenToTest CharacterMarries**Done
;    WhenToTest GovernorUnitTrained**Done
;    WhenToTest CharacterTurnEnd**Done
; Other end turn reckoners added mid script between sections that need or in future may need to see a HunThou total.
; If wealth is removed to replace with Huns and Thous then search "*" for lines to enable to take over, some may still need work.
;------------------------------------------
;Inflation Triggers (should remain as last End Turn triggers)
;------------------------------------------
Trigger InflationCheckReset
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Inflation = 1

    Affects InflationReset  1  Chance  100 

;done for all gens at the moment
;------------------------------------------
Trigger InflationCheck1
    WhenToTest CharacterTurnEnd

    Condition CharacterIsLocal
          and IsGeneral
          and Trait Inflation < 1
          and I_EventCounter inflationon = 1

    Affects Inflation  1  Chance  100 

;------------------------------------------
;Trigger Kings_Authority_ResetCheckTest
;   WhenToTest CharacterTurnEnd
;
;    Condition IsFactionLeader
;          and CharacterIsLocal
;          and Trait SuppressAuthority = 7
;
;    Affects Girls  50  Chance  100 
;
;applies Girls to FL if suppress is at top level
;------------------------------------------
;unhid inflation



Trigger WHTSyncTestH
   WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth <= 5
          and Trait Hundreds >= 1

    Affects Girls  50  Chance  100 

;applies Girls to character
;------------------------------------------
Trigger WHTSyncTestT
   WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth <= 5
          and Trait Thousands >= 1

    Affects Girls  50  Chance  100 

;applies Girls to character
;------------------------------------------
Trigger WHTSyncTestH1
   WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth <= 6
          and Trait Thousands = 2
          and Trait Hundreds >= 1

    Affects Girls  50  Chance  100 

;applies Girls to character
;------------------------------------------
Trigger WHTSyncTestT1
   WhenToTest CharacterTurnEnd

    Condition IsGeneral
          and CharacterIsLocal
          and Trait Wealth <= 6
          and Trait Thousands >= 3

    Affects Girls  50  Chance  100 

;applies Girls to character
;------------------------------------------










