Skip to content

Commit

Permalink
Adds Dark Crystal Artifact Generation
Browse files Browse the repository at this point in the history
Adds a combat event triggered on victory versus Orcish Fel army with caster_unit MAA (historical_artifacts.200). This event triggers a second one (201) that generates the Dark Crystal.
  • Loading branch information
socratespandagoa committed Dec 18, 2024
1 parent e727c8d commit 79d9726
Show file tree
Hide file tree
Showing 16 changed files with 264 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ dark_crystal_template = {

# can this character benefit from the full modifiers of the artifact?
can_benefit = {
OR = {
faith = { has_doctrine = doctrine_shadow_magic_accepted }
faith = { has_doctrine = doctrine_shadow_magic_approved }
}
}

# if a given character does not pass the "can_benefit" trigger then this modifier will be applied instead.
Expand Down
4 changes: 3 additions & 1 deletion common/on_action/combat_on_actions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on_combat_end_winner = {
fp1_shieldmaiden.0031 # Track shieldmaiden levelling.
historical_artifacts.0100 # #Save a memorable battle as potential topic for artifacts
combat_event.2101 # Battle Won: glory goes up.
#combat_event.2200 # Hereward beat a Norman #Warcraft
combat_event.3000 # Battle PoI Creation
historical_artifacts.0200 #Give Dark Crystal
}
random_events = {
1000 = 0
Expand Down Expand Up @@ -395,7 +398,6 @@ on_combat_end_winner = {
on_combat_end_loser = {
events = {
combat_event.0002 # Defeated commander loses shot at getting 'The Undefeated' nickname.

# Warcraft
# almohad.0003 # Check whether Ibn Tumert should die

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,60 @@ create_artifact_dark_crystal_effect = {
}
}

create_artifact_ashbringer_effect = {
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
set_artifact_rarity_illustrious = yes
# Create the artifact
create_artifact = {
name = ashbringer_name
description = ashbringer_desc
type = sword
visuals = ashbringer
wealth = scope:wealth
quality = scope:quality
history = {
type = created_before_history
}
modifier = ashbringer_modifier
save_scope_as = newly_created_artifact
decaying = yes
}
scope:newly_created_artifact = {
set_variable = { name = historical_unique_artifact value = yes }
set_variable = ashbringer
save_scope_as = illustrous
}
}

create_artifact_corrupted_ashbringer_effect = {
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
set_artifact_rarity_illustrious = yes

# Create the artifact
create_artifact = {
name = corrupted_ashbringer_name
description = corrupted_ashbringer_desc
type = sword
visuals = corrupted_ashbringer
wealth = scope:wealth
quality = scope:quality
history = {
type = created_before_history
}
modifier = corrupted_ashbringer_modifier
save_scope_as = newly_created_artifact
decaying = yes
}

scope:newly_created_artifact = {
set_variable = { name = historical_unique_artifact value = yes }
set_variable = corrupted_ashbringer
save_scope_as = illustrous
}
}

create_artifact_hammer_of_twilight_effect = {
# Get the character the artifact is being made for.
$OWNER$ = { save_scope_as = owner }
Expand Down
156 changes: 156 additions & 0 deletions events/artifacts/historical_artifacts_events.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,159 @@ historical_artifacts.0100 = {
}
}
}

###### ### #
## Dark Crystal & Ashbringer Artifact Events
## by Socratespanda
###### ### ##

#Give Out Dark Crystal after Facing Corruptist & Caster_Unit
#Most likely to fire in the 583 start date versus the Horde invasion from Draenor
historical_artifacts.0200 = {
scope = combat_side
hidden = yes

trigger = {
#Make sure they have the DLC enabled
#has_dlc_feature = royal_court

#Conditions for finding the Dark Crystal; opponent must be Corruptist (orcish_fel), and have Casters MAAs
AND = {
#Check for Caster_Unit (the Dark Crystal comes from Warlocks)
enemy_side = {
has_maa_of_type = caster_unit
}
#Check for Corruptist (orcish_fel) since they'd have an evil crystal
enemy_side.side_commander = {
has_faith = faith:orcish_fel
}

#Make sure we don't handle Dark_Crystal out like its candy on Halloween.
NOT = { any_artifact = { has_variable = dark_crystal } }
}
}

#Trigger the event that awards the combat winner the Dark Crystal artifact.
immediate = {

scope:combat_winner = {
trigger_event = historical_artifacts.0201
}
}
}

#Generates the Dark Crystal. Fires from historical_artifacts.0200
#This can have some flavor or lore, and hopefully an option to turn it over to the Silver Hand or someone else for Piety gain.
historical_artifacts.0201 = {
type = character_event
title = darkcrystal.0201.t
desc = darkcrystal.0201.desc
theme = battle

trigger = {

}

immediate = {

#Creating the Dark Crystal and saving it as a scope to manipulate later
create_artifact_dark_crystal_effect = { OWNER = root }

scope:newly_created_artifact = {
save_scope_as = dark_crystal
}

cp:councillor_court_chaplain = {
save_scope_as = realm_priest
}

#Let's pick a random "evil" faith to give a mysterious NPC who tells you about the dark_crystal
random_religion_global = {

random_faith = {
limit = {
OR = {
has_doctrine = doctrine_shadow_magic_accepted
has_doctrine = doctrine_shadow_magic_approved
}
}

save_scope_as = dark_faith
}
}

#Finding an additional 1-2 people to consult with about dark magic
# 1, Realm Priest
if = {
limit = {
exists = realm_priest
}
scope:realm_priest = {
save_scope_as = dark_magic_consultant_1
}
}
#2, Someone Mysterious, using dark_faith assigned above
create_character = {
template = witchy_template
#faith = faith:burning_legion_religion
location = root.location
faith = scope:dark_faith
gender = female
save_scope_as = dark_magic_consultant_2
}
}

left_portrait = {
character = root
animation = war_over_win
}

right_portrait = {
character = scope:dark_magic_consultant_1
animation = personality_zealous
}

lower_right_portrait = scope:dark_magic_consultant_2

#We hand over the Dark Crystal, for safety
option = {
name = darkcrystal.0201.a
trigger = {
exists = scope:realm_priest
}

scope:dark_crystal = {
set_owner = {
target = scope:realm_priest
}
}
add_piety = 500
}

#We keep the Dark Crystal, not for safety
option = {
name = darkcrystal.0201.b
add_piety = major_piety_loss
}

#Why not both?
option = {
name = darkcrystal.0201.c
trigger = {
AND = {
exists = scope:dark_magic_consultant_2
}
}
set_relation_potential_lover = scope:dark_magic_consultant_2
scope:dark_magic_consultant_2 = {
add_opinion = {
target = root
modifier = flirty_opinion
}
}
root = {
add_courtier = scope:dark_magic_consultant_2
add_piety = -500
}
}
}
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions gfx/models/artifacts/weapons/wc_ashbringer/wc_ashbringer.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
pdxmesh = {
name = "ashbringer_portrait_mesh"
file = "wc_ashbringer_portrait.mesh"

meshsettings = {
name = "ashbringer_portraitShape"
index = 0
texture_diffuse = "wc_ashbringer_portrait_diffuse.dds"
texture_normal = "wc_ashbringer_portrait_normal.dds"
texture_specular = "wc_ashbringer_portrait_properties.dds"
shader = "portrait_attachment"
shader_file = "gfx/FX/jomini/portrait.shader"
}
}

entity = {
name = "ashbringer_portrait_entity"
pdxmesh = "ashbringer_portrait_mesh"
}

pdxmesh = {
name = "corrupted_ashbringer_portrait_mesh"
file = "wc_corrupted_ashbringer_portrait.mesh"

meshsettings = {
name = "corruptedashbringer_portraitShape"
index = 0
texture_diffuse = "wc_corrupted_ashbringer_portrait_diffuse.dds"
texture_normal = "wc_corrupted_ashbringer_portrait_normal.dds"
texture_specular = "wc_corrupted_ashbringer_portrait_properties.dds"
shader = "portrait_attachment"
shader_file = "gfx/FX/jomini/portrait.shader"
}
}

entity = {
name = "corrupted_ashbringer_portrait_entity"
pdxmesh = "corrupted_ashbringer_portrait_mesh"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
l_english:

darkcrystal.0201.t:0 "A Warlock's Weapon"
darkcrystal.0201.desc:0 "At last, after a fierce battle, the corpse of the orc warlock lies on the ground admist our fallen. His weapon, a dark crystal, rests in his palm, emitting a sinister glow.\n\nAs I approach, a shiver runs down my spine. My gaze is locked on the artifact, drawn in by its hypnotic glow. It whispers at the edge of my mind, calling out to me. I bend down and reach for it. The instant my fingers brush the crystal, a searing pain shoots through me.\n\n"Aargh! What sorcery is this?!" I shout as I drop the crystal."

darkcrystal.0201.a:0 "It belongs with the church."
darkcrystal.0201.b:0 "It could be a powerful weapon for the [ROOT.Char.GetFaith.GetName]."
darkcrystal.0201.c:0 "The mysterious [dark_magic_consultant_2.GetName] knows something..."

0 comments on commit 79d9726

Please sign in to comment.