Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Gobo formatting commit
dfaee2ac365996e0102b320aab97786ac0498c9b
13 changes: 8 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
* text working-tree-encoding=UTF-8

# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
* text=auto eol=lf

# For safety
*.yyp text eol=crlf
*.yy text eol=crlf
*.gml text eol=crlf
# For Windows safety
*.cmd text eol=crlf
*.CMD text eol=crlf
*.bat text eol=crlf
*.BAT text eol=crlf
*.ps1 text eol=crlf
*.PS1 text eol=crlf

# Re-classify .yy files (for GMS 2 projects)
*.yy linguist-language=GML
Expand Down
1 change: 0 additions & 1 deletion ChapterMaster.yyp
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@
{"id":{"name":"scr_apothecary_ground","path":"scripts/scr_apothecary_ground/scr_apothecary_ground.yy",},},
{"id":{"name":"scr_apothecary_ship","path":"scripts/scr_apothecary_ship/scr_apothecary_ship.yy",},},
{"id":{"name":"scr_array_functions","path":"scripts/scr_array_functions/scr_array_functions.yy",},},
{"id":{"name":"scr_arti_descr","path":"scripts/scr_arti_descr/scr_arti_descr.yy",},},
{"id":{"name":"scr_audience","path":"scripts/scr_audience/scr_audience.yy",},},
{"id":{"name":"scr_battle_allies","path":"scripts/scr_battle_allies/scr_battle_allies.yy",},},
{"id":{"name":"scr_battle_sort","path":"scripts/scr_battle_sort/scr_battle_sort.yy",},},
Expand Down
2 changes: 1 addition & 1 deletion options/main/options_main.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

198 changes: 192 additions & 6 deletions scripts/scr_add_artifact/scr_add_artifact.gml
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,11 @@ function ArtifactStruct(Index) constructor {
var demonSummonChance = roll_dice_chapter(1, 100, "high");

if ((demonSummonChance <= 60) && (obj_ini.ship_carrying[_ship_id] > 0)) {
instance_create(0, 0, obj_ncombat);
obj_ncombat.battle_special = "ship_demon";
obj_ncombat.formation_set = 1;
obj_ncombat.enemy = 10;
obj_ncombat.battle_id = _ship_id;
var _combat = instance_create_depth(0, 0, 0, obj_ncombat);
_combat.battle_special = "ship_demon";
_combat.formation_set = 1;
_combat.enemy = 10;
_combat.battle_id = _ship_id;
scr_ship_battle(_ship_id, 999);
}
}
Expand Down Expand Up @@ -604,7 +604,193 @@ function ArtifactStruct(Index) constructor {
custom_description = "";
bearer = false;

static description = scr_arti_descr;
static assign_text_from_tag_match = function(text_set) {
var _return_text = "";
var _tag_names = struct_get_names(text_set);
var _len = array_length(_tag_names);

for (var i = 0; i < _len; i++) {
if (has_tag(_tag_names[i])) {
_return_text = text_set[$ _tag_names[i]];
break;
}
}
return _return_text;
};

/// @desc Generates a formatted description for an artifact based on its tags and type.
/// @returns {string} The full descriptive text.
static get_description = function() {
var _custom_desc = string(custom_description);

if (_custom_desc != "") {
return _custom_desc;
}

var _final_description = "";
var _mission_text = "";
var _aesthetic_text = "";
var _extra_text = "";

var _type_category = determine_base_type();
var _specific_type = type();
var _is_inquisition = has_tag("inq");
var _is_chaos_gift = has_tag("chaos_gift");

// 1. Mission Data
if (_type_category != "armour") {
_mission_text = $"This artifact is a {_specific_type}";
} else {
_mission_text = $"This artifact is {_specific_type}";
}

if (_is_inquisition) {
_mission_text += ", entrusted by the Inquisition.#";
} else if (_is_chaos_gift) {
_mission_text = $"This artifact is a {_specific_type} gifted by the Chaos Lord.";
} else {
_mission_text += ".#";
}

// 2. Aesthetic Logic
if (_type_category == "weapon") {
static _weapon_primary = {
"RUNE": "Several glowing runes have been carved along its surfaces.",
"SCOPE": "An extremely finely crafted scope, with several lenses, sits on top.",
"DUB": "Rather than a single power fist there is a matching pair of two.",
"ADAMANTINE": "All ceremite on the weapon has been substituted for polished adamantium.",
"VOI": "The weapon is black as night, with green, pulsing veins of an unknown energy.",
"CHB": "The striking surface has been replaced with a very powerful chainblade.",
"UFL": "A promethium flamethrower has been built in to the bottom of the weapon.",
};

_aesthetic_text = string(assign_text_from_tag_match(_weapon_primary));

if (_specific_type == "Power Fist" && has_tag("CHB")) {
_aesthetic_text = "The addition of a small chainblade has turned it into a chainfist.";
}

static _weapon_secondary = {
"GOLD": "It is decorated with gold filigree.",
"GLOW": "It glows with an eery, soft blue color.",
"UBOLT": "A bolter has been integrated.",
};
_extra_text = string(assign_text_from_tag_match(_weapon_secondary));
} else if (_type_category == "armour") {
static _armour_primary = {
"ART": "Much of the armour is made up of finely articulated plates, neatly interlocking.",
"SPIKES": "A multitude of spikes, of varying sizes, adorn the armour.",
"RUNE": "Several glowing runes have been carved along its surfaces.",
"DRA": "Several areas of the armour have been patched over with Drake scales.",
};
_aesthetic_text = string(assign_text_from_tag_match(_armour_primary));

static _armour_secondary = {
"GOLD": "It is decorated with gold filigree.",
"GLOW": "The optics glow dark red.",
"PUR": "It has many crude purity seals.",
};
_extra_text = string(assign_text_from_tag_match(_armour_secondary));
} else if (_type_category == "gear") {
static _gear_primary = {
"SUP": "It has been carved with such intricate detail that the facets are uncountable.",
"ADAMANTINE": "All ceremite on the item has been substituted for polished adamantium.",
"GOLD": "All ceremite on the item has been replaced with shining, polished gold.",
};
_aesthetic_text = string(assign_text_from_tag_match(_gear_primary));

static _gear_secondary = {
"SAL": "An emblem of a Fire Drake is embossed on the cover.",
"ADAMANTINE": "All ceremite on the item has been substituted for polished adamantium.",
"GOLD": "All ceremite on the item has been replaced with shining, polished gold.",
"GLOW": "It glows a soft green color.",
"BUR": "Small, non-burning flames lick across the surface.",
"BIG": "It is of unusually large size.",
"SOO": "It has a soothing appearance.",
"RUNE": "Several glowing runes have been carved along its surfaces.",
"MASK": "It is shaped and contorted into a Fearsome Mask.",
"SPIKES": "A multitude of spikes, of varying sizes, adorn it.",
"SKRE": "While on it lets out a tormented scream.",
"SILENT": "Somehow it is completely silent in operation.",
"GOR": "The arms are especially lengthy and massively strong.",
"TENTACLES": "Instead of a single arm it is made up of many smaller tentacles.",
};
_extra_text = string(assign_text_from_tag_match(_gear_secondary));
} else if (_type_category == "device") {
if (_specific_type != "Robot") {
static _dev_primary = {
"GLOW": "It emits a sickly, red glow that unnerves those that look upon it.",
"ADAMANTINE": "The device is seemingly built of near-pure adamantium, impressively heavy.",
"GOLD": "The device is covered in a thin layer of gold, which glitters and shines.",
"CRU": "Many parts of the device are crumbling apart and cracking from old age.",
};
_aesthetic_text = string(assign_text_from_tag_match(_dev_primary));

static _dev_secondary = {
"SKU": "It is fashioned to resemble a massive pile of skulls of all races and ages.",
"FAL": "It resembles an angel, fallen with broken wings, a sad look on its face.",
"TENTACLES": "Carved on top is a ball of wriggling tentacles, eyes, and fangs.",
"MIN": "The top panel seemingly writhes with motion, the geometric shapes blinding to behold.",
"GOAT": "It resembles a bipedal goat with odd skin blemishes and four small horns.",
"THI": "Carved on top is a strange creature with elongated limbs and small head.",
"SPE": "The statue is of a man with no eyes, ears, or nose. The teeth are rotted and mishappen.",
"DYI": "The statue is of an angel, sagging against a spear which has pierced its heart.",
"JUM": "It resembles a scene of small children with large heads happily jumping into a pit of magma.",
"CHE": "The statue resembles a fat grinx which smiles and looks outward with a malicious gaze.",
};
_extra_text = string(assign_text_from_tag_match(_dev_secondary));
} else {
static _bot_primary = {
"HU": "It is built in the likeness of an attractive human female.",
"RO": "It is squat and fat, though tall, and has simple utilitarian limbs.",
"SHI": "The device is covered in a thin layer of gold, which glitters and shines.",
"CRU": "It resembles a roaring, four-armed woman with abundant curves.",
};
_aesthetic_text = string(assign_text_from_tag_match(_bot_primary));

static _bot_secondary = {
"ADAMANTINE": "The machine is seemingly built of near-pure adamantium, impressively heavy.",
"JAD": "The machine is built out of a type of jade, pure black, with many veins of green.",
"BRO": "The machine is made out of a strange bronze material that seems impossibly durable.",
"RUNE": "Several glowing runes have been carved along its surfaces.",
};
_extra_text = string(assign_text_from_tag_match(_bot_secondary));
}
}

// 3. Final Assembly
if (has_tag("MINOR")) {
_extra_text += " It is more crude and utilitarian than one might expect from an artifact.";
}

var _taint_text = "";
if (has_tag("chaos")) {
_taint_text = "It bears the taint of Chaos.";
}
if (has_tag("daemonic")) {
_taint_text = "It is infested with a Daemonic entity. Destroying it, may cause the entity to materialize.";
}

_final_description = _mission_text;
if (_aesthetic_text != "") {
_final_description += $" {_aesthetic_text}";
}
if (_extra_text != "") {
_final_description += $" {_extra_text}";
}
if (_taint_text != "") {
_final_description += $" {_taint_text}";
}

if (equipped() && is_array(bearer)) {
var _unit = fetch_unit(bearer);
if (is_struct(_unit)) {
_final_description += $"#It is currently in the possession of {_unit.name_role()}.";
}
}

return string(_final_description);
};
}

function corrupt_artifact_collectors(last_artifact) {
Expand Down
Loading