From afdbedb31df18984302791ef3c7b731b1f32ce3c Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Mon, 8 Nov 2021 22:23:54 +0000 Subject: [PATCH] day 3 --- Artwork/ability_poisonous.png | Bin 0 -> 1165 bytes Plugin.cs | 80 +++++++++++++++++++++++++++++----- manifest.json | 2 +- 3 files changed, 70 insertions(+), 12 deletions(-) create mode 100644 Artwork/ability_poisonous.png diff --git a/Artwork/ability_poisonous.png b/Artwork/ability_poisonous.png new file mode 100644 index 0000000000000000000000000000000000000000..620aac23eb095912c8bcb531e10e0ed96d1943e6 GIT binary patch literal 1165 zcmV;81akX{P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=K3k|ZY#h4-AoM?exn;y5Hf5x#+s?*~O^b=UMv zgvVZZQAuP%D#Ziz3937czy6%z4_s6vhNR}X4~zU0(+|6&jK z2Zl+O=i@bx<6mLdX9r8ietoqEYe&bA(1)b?`c@O3EtLf8n&fUhA zh;&3>-;*I2U11asJOp+;d5t3LCaJjBGm0-Kl)AqyOZh%_;cmVJ?{2-sF4kk0ub~Jr zABX%BqhlxiK6X1opJznRk-vN}xrg{6c5`;0b39g8Q%0n6IE(sN%5K5&LMUZ-%P59h z(Y9R*ierfl#5!nRC@oMSMzkj->Qrgc*ma|ZDJC9lsF@oWESrmQ;fA1-q*Z9LNs%7J z!J~niz|8ktXpdX=c#Rw*cY-Gq#AtJTDd9Wg@043;&Xu}E(eGGcUc3?z(^%xz6J7v9 z^Tbqle0K?-@+N))D z)Oy{&D6#>qUASTzW#V9i!|=*p*Kg8q*Wup^yoKIEZ=tu)Tj(wH7W)4PP5kkIfB3@R z!7h=7&p*qK00006VoOIv0K5Ra0K6jSrnvwB010qNS#tmY4#NNd4#NS*Z>VGd000Mc zNliruUIm#5N?L zGHVqH7(gO}NJ~-x&N;^uQ3Ys7o6KrGluFQ$_bqcuNMN#X$sY?cJ%PJ=uPz46ixYR< zowJqT$EPZG^m?TQ41BdY2H^zbVU%a5Z_pzGWuAZ`_s@bxrLjjq(?CD6?Z|%Z_}7-8 zk_0Ei44L%<6CmLLuU7Eq9^Mx~b^k+S_LIHaTjuw00000NkvXXu0mjfFkTV< literal 0 HcmV?d00001 diff --git a/Plugin.cs b/Plugin.cs index d680e8c..5e2152a 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -19,7 +19,7 @@ public class Plugin : BaseUnityPlugin { private const string PluginGuid = "cyantist.inscryption.sigiladay"; private const string PluginName = "SigilADay"; - private const string PluginVersion = "1.0.0.0"; + private const string PluginVersion = "1.1.0.0"; private void Awake() { @@ -31,6 +31,7 @@ private void Awake() AddRegen2(); AddRegen3(); AddRegenFull(); + AddPoisonous(); } private NewAbility AddBloodGuzzler() @@ -172,13 +173,36 @@ private NewAbility AddRegenFull() return ability; } + private NewAbility AddPoisonous() + { + AbilityInfo info = ScriptableObject.CreateInstance(); + info.powerLevel = 3; + info.rulebookName = "Poisonous"; + info.rulebookDescription = "When [creature] perishes, the creature that killed it perishes as well."; + info.metaCategories = new List {AbilityMetaCategory.Part1Rulebook, AbilityMetaCategory.Part1Modular}; + + List lines = new List(); + DialogueEvent.Line line = new DialogueEvent.Line(); + line.text = "When this creature perishes, it will kill the creature that killed it."; + lines.Add(line); + info.abilityLearnedDialogue = new DialogueEvent.LineSet(lines); + + byte[] imgBytes = System.IO.File.ReadAllBytes("BepInEx/plugins/CardLoader/Artwork/ability_poisonous.png"); + Texture2D tex = new Texture2D(2,2); + tex.LoadImage(imgBytes); + + NewAbility ability = new NewAbility(info,typeof(Poisonous),tex); + BloodGuzzler.ability = ability.ability; + return ability; + } + public class BloodGuzzler : AbilityBehaviour { public override Ability Ability { get { - return ability; + return ability; } } @@ -219,7 +243,7 @@ public override Ability Ability { get { - return ability; + return ability; } } @@ -251,7 +275,7 @@ public override Ability Ability { get { - return ability; + return ability; } } @@ -259,7 +283,7 @@ public override Ability Ability public override bool RespondsToUpkeep(bool playerUpkeep) { - return base.Card.OpponentCard != playerUpkeep; + return base.Card.OpponentCard != playerUpkeep; } public override IEnumerator OnUpkeep(bool playerUpkeep) @@ -280,7 +304,7 @@ public override Ability Ability { get { - return ability; + return ability; } } @@ -288,7 +312,7 @@ public override Ability Ability public override bool RespondsToUpkeep(bool playerUpkeep) { - return base.Card.OpponentCard != playerUpkeep; + return base.Card.OpponentCard != playerUpkeep; } public override IEnumerator OnUpkeep(bool playerUpkeep) @@ -309,7 +333,7 @@ public override Ability Ability { get { - return ability; + return ability; } } @@ -317,7 +341,7 @@ public override Ability Ability public override bool RespondsToUpkeep(bool playerUpkeep) { - return base.Card.OpponentCard != playerUpkeep; + return base.Card.OpponentCard != playerUpkeep; } public override IEnumerator OnUpkeep(bool playerUpkeep) @@ -338,7 +362,7 @@ public override Ability Ability { get { - return ability; + return ability; } } @@ -346,7 +370,7 @@ public override Ability Ability public override bool RespondsToUpkeep(bool playerUpkeep) { - return base.Card.OpponentCard != playerUpkeep; + return base.Card.OpponentCard != playerUpkeep; } public override IEnumerator OnUpkeep(bool playerUpkeep) @@ -357,5 +381,39 @@ public override IEnumerator OnUpkeep(bool playerUpkeep) yield break; } } + + public class Poisonous : AbilityBehaviour + { + public override Ability Ability + { + get + { + return ability; + } + } + + public static Ability ability; + + public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer) + { + return !wasSacrifice && base.Card.OnBoard; + } + + public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer) + { + yield return base.PreSuccessfulTriggerSequence(); + yield return new WaitForSeconds(0.25f); + if (killer != null) + { + yield return killer.Die(false, base.Card, true); + if (Singleton.Instance is BoardManager3D) + { + yield return new WaitForSeconds(0.5f); + yield return base.LearnAbility(0.5f); + } + } + yield break; + } + } } } diff --git a/manifest.json b/manifest.json index 059c3ef..edff3a6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "SigilADay", - "version_number": "1.0.0", + "version_number": "1.1.0", "website_url": "https://github.com/ScottWilson0903/InscryptionExampleMod", "description": "Collection of custom sigils", "dependencies": [