@BEGINEVENTS

@IF
NOSCHISM
DEFENDER=anybody 
@THEN
 
@ENDIF

@IF
CITYTAKEN
city=Kyoto
attacker=anybody
defender=South Fujiwara
@THEN
TEXT 
The enemy marches into Kyoto triumphantly,
and the regency of the Fujiwara comes to
and end. The monks of the mountains seize
the opportunity to expand their influence!
ENDTEXT
JustOnce
PLAYWAVEFILE
kyoto.wav
MakeAggression
who=Monks
whom=South Fujiwara
@ENDIF

@IF
UNITKILLED
unit=Noble
attacker=Arimoto
defender=South Fujiwara
@THEN
TEXT
The Arimoto ambush and rob a courtier,
gaining 50 gold.
ENDTEXT
ChangeMoney
receiver=Arimoto
amount=50
@ENDIF

@IF
UNITKILLED
unit=Noble
attacker=Taira
defender=South Fujiwara
@THEN
TEXT
The Taira ambush and rob a courtier,
gaining 50 gold.
ENDTEXT
ChangeMoney
receiver=Taira
amount=50
@ENDIF

@IF
UNITKILLED
unit=Noble
attacker=Minamoto
defender=South Fujiwara
@THEN
TEXT
The Minamoto ambush and rob a courtier,
gaining 50 gold.
ENDTEXT
ChangeMoney
receiver=Minamoto
amount=50
@ENDIF

@IF
UNITKILLED
unit=Noble
attacker=Miura
defender=South Fujiwara
@THEN
TEXT
The Miura ambush and rob a courtier,
gaining 50 gold.
ENDTEXT
ChangeMoney
receiver=Miura
amount=50
@ENDIF

@IF
UNITKILLED
unit=Noble
attacker=North Fujiwara
defender=South Fujiwara
@THEN
TEXT
The North Fujiwara ambush and rob a courtier,
gaining 50 gold.
ENDTEXT
ChangeMoney
receiver=North Fujiwara
amount=50
@ENDIF

@IF
UNITKILLED
unit=Tomoyori
attacker=anybody
defender=Arimoto
@THEN
TEXT
The clan chief of the Arimoto, a civilized 
man from the court in Kyoto, surrenders 
rather than fights to death.
ENDTEXT
PLAYWAVEFILE
drumby.wav
@ENDIF

@IF
UNITKILLED
unit=Tomoyori
attacker=Taira
defender=Arimoto
@THEN
TEXT
As he retires the Monks join the Taira against
his clan!
ENDTEXT
MakeAggression
who=Monks
whom=Arimoto
@ENDIF

@IF
UNITKILLED
unit=Kiyohira
attacker=anybody
defender=North Fujiwara
@THEN
TEXT 
The valiant leader of the North Fujiwara
manages to keep the enemy at bay, until they
set the palace on fire. He perishes in the
flames, but his suddenly masterless samurai vow
to avenge him!
ENDTEXT
PLAYWAVEFILE
execute.wav
CreateUnit
owner=North Fujiwara
unit=Ronin
veteran=yes
homecity=none
locations
116,18
endlocations
@ENDIF

@IF
UNITKILLED
unit=Kiyohira
attacker=anybody
defender=North Fujiwara
@THEN
CreateUnit
owner=North Fujiwara
unit=Ronin
veteran=yes
homecity=none
locations
116,18
endlocations
@ENDIF

@IF
UNITKILLED
unit=Kiyohira
attacker=anybody
defender=North Fujiwara
@THEN
CreateUnit
owner=North Fujiwara
unit=Ronin
veteran=yes
homecity=none
locations
116,18
endlocations
@ENDIF
 
@IF
UNITKILLED
unit=Tametsugu
attacker=anybody
defender=Miura
@THEN
TEXT 
The clan chief of the Miura dies,
having in vain attempted to bribe the
attackers.
ENDTEXT
PLAYWAVEFILE
execute.wav
@ENDIF

@IF
UNITKILLED
unit=Zyo
attacker=anybody
defender=Monks
@THEN
TEXT 
The enemy withdraws in fear at the sight of
the blood-drenched abbot and his massive 
naginata. But an arrow finds his eye, and
the mighty warrior comes to an end. His
secular rivals decide to put the monasteries
in place once and for all.
ENDTEXT
PLAYWAVEFILE
execute.wav
MakeAggression
who=Taira
whom=Monks
@ENDIF

@IF
UNITKILLED
unit=Zyo
attacker=anybody
defender=Monks
@THEN
MakeAggression
who=Arimoto
whom=Monks
@ENDIF

@IF
UNITKILLED
unit=Zyo
attacker=anybody
defender=Monks
@THEN
MakeAggression
who=South Fujiwara
whom=Monks
@ENDIF

@IF
UNITKILLED
unit=Zyo
attacker=anybody
defender=Monks
@THEN
MakeAggression
who=Minamoto
whom=Monks
@ENDIF

@IF
UNITKILLED
unit=Yoshiie
attacker=anybody
defender=Minamoto
@THEN
TEXT 
The foes close in on the valiant Yoshiie, and
he honorably performs the ritual of seppuku,
while his last men die around him. 
ENDTEXT
PLAYWAVEFILE
seppuku.wav
@ENDIF

@IF
UNITKILLED
unit=Yoshiie
attacker=Taira
defender=Minamoto
@THEN
TEXT
As the Minamoto strongman is no longer in
their way, his arch-enemies the Taira form
a grand alliance against his family!
ENDTEXT
PLAYWAVEFILE
kyoto.wav
MakeAggresssion
who=Monks
whom=Minamoto
@ENDIF

@IF
UNITKILLED
unit=Yoshiie
attacker=Taira
defender=Minamoto
@THEN
MakeAggresssion
who=Miura
whom=Minamoto
@ENDIF

@IF
UNITKILLED
unit=Yoshiie
attacker=Taira
defender=Minamoto
@THEN
MakeAggresssion
who=North Fujiwara
whom=Minamoto
@ENDIF

@IF
UNITKILLED
unit=Shigemori
attacker=anybody
defender=Taira
@THEN
TEXT 
Shigemori severes yet another head, but the
stream of foes seems endless. With many 
arrows in his armor he is exhausted, captured
and executed.
ENDTEXT
PLAYWAVEFILE
execute.wav
MakeAggression
who=Minamoto
whom=Taira
@ENDIF

@IF
UNITKILLED
unit=Shigemori
attacker=Minamoto
defender=Taira
@THEN
TEXT 
With the passing of the charismatic
Taira chief the Arimoto, Miura and
the monasteries decide to join the
Minamoto crusade!
ENDTEXT
PLAYWAVEFILE
kyoto.wav
MakeAggression
who=Monks
whom=Taira
@ENDIF

@IF
UNITKILLED
unit=Shigemori
attacker=Minamoto
defender=Taira
@THEN
MakeAggression
who=Arimoto
whom=Taira
@ENDIF

@IF
UNITKILLED
unit=Shigemori
attacker=Minamoto
defender=Taira
@THEN
MakeAggression
who=Miura
whom=Taira
@ENDIF

@IF
RANDOMTURN
denominator=60
@THEN
CreateUnit
owner=Taira
unit=Pirates
veteran=yes
homecity=none
locations
51,83
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=40
@THEN
PLAYWAVEFILE
spysound.wav
CreateUnit
owner=Taira
unit=Ninja
veteran=yes
homecity=none
locations
51,83
82,52
17,79
16,96
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=40
@THEN
PLAYWAVEFILE
spysound.wav
CreateUnit
owner=Minamoto
unit=Ninja
veteran=yes
homecity=none
locations
99,65
95,39
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=50
@THEN
PLAYWAVEFILE
spysound.wav
CreateUnit
owner=Arimoto
unit=Ninja
veteran=yes
homecity=none
locations
49,77
39,65
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=50
@THEN
PLAYWAVEFILE
spysound.wav
CreateUnit
owner=North Fujiwara
unit=Ninja
veteran=yes
homecity=none
locations
116,18
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=60
@THEN
PLAYWAVEFILE
spysound.wav
CreateUnit
owner=Miura
unit=Ninja
veteran=yes
homecity=none
locations
106,84
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=80
@THEN
TEXT
^A typhoon forms in the North!
ENDTEXT
PLAYWAVEFILE
Custom2.wav
CreateUnit
owner=Barbarians
unit=Typhoon
veteran=yes
homecity=none
locations
60,60
78,40
88,44
48,60
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=80
@THEN
TEXT
^A typhoon forms in the East!
ENDTEXT
PLAYWAVEFILE
Custom2.wav
CreateUnit
owner=Barbarians
unit=Typhoon
veteran=yes
homecity=none
locations
120,34
119,35
121,35
118,36
123,31
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=80
@THEN
TEXT
^A typhoon forms in the South!
ENDTEXT
PLAYWAVEFILE
Custom2.wav
CreateUnit
owner=Barbarians
unit=Typhoon
veteran=yes
homecity=none
locations
93,93
103,93
76,92
83,89
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=80
@THEN
TEXT
^A typhoon forms in the West!
ENDTEXT
PLAYWAVEFILE
Custom2.wav
CreateUnit
owner=Barbarians
unit=Typhoon
veteran=yes
homecity=none
locations
24,72
34,88
8,48
33,65
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=120
@THEN
JustOnce
TEXT
^A terrible Oni descends from his mountain!
ENDTEXT
CreateUnit
owner=Barbarians
unit=Demon
veteran=yes
homecity=none
locations
85,63
85,65
86,64
86,62
84,62
85,61
85,59
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=40
@THEN
CreateUnit
owner=Barbarians
unit=Emishi
veteran=yes
homecity=none
locations
110,12
110,14
110,10
111,11
111,9
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=50
@THEN
CreateUnit
owner=Barbarians
unit=Ninja
veteran=yes
homecity=none
locations
100,62
98,62
99,61
98,60
100,60
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=30
@THEN
CreateUnit
owner=Barbarians
unit=Bandits
veteran=yes
homecity=none
locations
83,73
82,74
84,72
81,75
85,71
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=40
@THEN
CreateUnit
owner=Barbarians
unit=Rogue Monks
veteran=yes
homecity=none
locations
66,92
65,93
64,92
65,91
65,95
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=50
@THEN
CreateUnit
owner=Barbarians
unit=Ronin
veteran=yes
homecity=none
locations
43,71
43,69
44,70
42,70
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=100
@THEN
JustOnce
TEXT
^The ghost of Taira no Masakado rises to avenge his death!
ENDTEXT
PLAYWAVEFILE
divebomb.wav
CreateUnit
owner=Barbarians
unit=Ghost
veteran=yes
homecity=none
locations
107,73
106,72
108,72
106,76
109,73
110,74
111,73
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=100
@THEN
JustOnce
TEXT
^The ghost of Abe no Yoritoki rises to avenge his death!
ENDTEXT
PLAYWAVEFILE
divebomb.wav
CreateUnit
owner=Barbarians
unit=Ghost
veteran=yes
homecity=none
locations
108,24
109,25
107,25
107,23
105,25
106,24
106,22
endlocations
@ENDIF

@IF
RANDOMTURN
denominator=100
@THEN
JustOnce
TEXT
^The ghost of Soga no Iruka rises to avenge his death!
ENDTEXT
PLAYWAVEFILE
divebomb.wav
CreateUnit
owner=Barbarians
unit=Ghost
veteran=yes
homecity=none
locations
75,71
74,72
74,70
76,72
75,73
73,73
76,72
endlocations
@ENDIF

@ENDEVENTS
