;====================================================================================================== ;------- Hanseatic System
;======================================================================================================
;----------------- (I) Prevent non-eligible provices from getting it ----------------------
; counter is used in EDG
set_event_counter hanseatic_guild_allowed 0
monitor_event FactionTurnStart FactionType slave
inc_event_counter hanseatic_guild_allowed 1
if I_EventCounter hanseatic_guild_allowed > 20
set_event_counter hanseatic_guild_allowed 0
end_if
end_monitor
;----------------- (II) Allow giving points in EDG ----------------------
monitor_event PreFactionTurnStart TrueCondition
set_event_counter hanseatic_count -1
end_monitor
monitor_event CharacterTurnStart GovernorPlugInExists = hansa
and I_EventCounter hanseatic_league = 1
inc_event_counter hanseatic_count 1
end_monitor
monitor_event CharacterTurnStart GovernorPlugInExists = c_hansa
and I_EventCounter hanseatic_league = 1
inc_event_counter hanseatic_count 1
end_monitor
set_event_counter hanseatic_constructed 0
monitor_event GuildUpgraded BuildingName = hanseatic_guild
set_event_counter hanseatic_constructed 1
reset_guild_standing hanseatic_guild
end_monitor
monitor_event BuildingDestroyed BuildingName = hanseatic_guild
set_event_counter hanseatic_constructed 0
reset_guild_standing hanseatic_guild
end_monitor
;----------------- (III) Replace Merchant guilds with Hanse
;
; The problem: Hanse comes very late into the play and the relevant settlements can already have other guilds built
; A script is needed when certain nations (hre, lithuania, poland, denmark) would be offered replacement of merchants' guild with hanseatic
; This script could also be used for similar action with the Explorers' guild
;
; monitor_event FactionTurnStart FactionType hre
; destroy_buildings hre hanseatic_guild true