Skip to content

Commit

Permalink
Day 8
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottWilson0903 committed Nov 14, 2021
1 parent c2c6582 commit 972a502
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 4 deletions.
Binary file added Artwork/ability_silence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Artwork/ability_transient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ public partial class Plugin : BaseUnityPlugin
{
private const string PluginGuid = "cyantist.inscryption.sigiladay";
private const string PluginName = "SigilADay";
private const string PluginVersion = "1.4.1.0";
private const string PluginVersion = "1.5.0.0";

internal static ManualLogSource Log;

private void Awake()
{
Logger.LogInfo($"Loaded {PluginName}!");
Plugin.Log = base.Logger;

AddBloodGuzzler();
AddLeech();
Expand All @@ -35,6 +38,8 @@ private void Awake()
AddThickShell();
AddBonePicker();
AddNutritious();
AddTransient();
//AddSilence();

ChangeRingworm();
}
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SigilADay
Collection of custom sigils added to daily by Cyantist.

## Sigils so far (Day 6)
## Sigils so far (Day 8)
- BloodGuzzler: When a creature bearing this sigil deals damage, it gains 1 Health for each damage dealt.
- Leech: When a creature bearing this sigil deals damage, it heals 1 Health for each damage dealt.
- Regen 1: This creature will heal 1 Health at the end of it's owner's turn.
Expand All @@ -12,16 +12,18 @@ Collection of custom sigils added to daily by Cyantist.
- Thick Shell: When this creature is attacked, it will take one less damage.
- Bonepicker - When this creature kills a creature, you gain one bone.
- Nutritious - A creature gains 1 power and 2 health when summoned using a creature with this sigil as a sacrifice.
- Transient - A creature with this sigil will return to your hand at the end of the turn.
- Silence (WIP) - Creatures opposing a creature with this sigil have all their sigils silenced.

## Suggest an idea
[Suggest](https://forms.gle/2GtJP16gB6kUbrJg8)

[Already Submitted](https://docs.google.com/spreadsheets/d/1kxw50Brl9Pr1oM1UhjJnZyzyKbKZiDV_L5TLqp6lDR8/edit?resourcekey#gid=529419162)

## Vote on the next sigils!
[Day 7 Voting Link](https://forms.gle/jETFQzKLD4aaHvrc9)
[Day 9 Voting Link](https://forms.gle/q1sjWtH24tiBj35p9)

[Day 8 Voting Link](https://forms.gle/sw1wtB3gSP5HCBy17)
[Day 10 Voting Link](https://forms.gle/FePigWwGPSazDBka9)

## Installation (automated)
This is the recommended way to install the API on the game.
Expand Down
51 changes: 51 additions & 0 deletions sigils/Silence.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using APIPlugin;
using DiskCardGame;
using HarmonyLib;

namespace SigilADay
{
public partial class Plugin
{
private NewAbility AddSilence()
{
AbilityInfo info = ScriptableObject.CreateInstance<AbilityInfo>();
info.powerLevel = 5;
info.rulebookName = "Silence";
info.rulebookDescription = "Creatures opposing [creature] have all their sigils silenced.";
info.metaCategories = new List<AbilityMetaCategory> {AbilityMetaCategory.Part1Rulebook, AbilityMetaCategory.Part1Modular};

List<DialogueEvent.Line> lines = new List<DialogueEvent.Line>();
DialogueEvent.Line line = new DialogueEvent.Line();
line.text = "The sigils opposing your creature are silenced!";
lines.Add(line);
info.abilityLearnedDialogue = new DialogueEvent.LineSet(lines);

byte[] imgBytes = System.IO.File.ReadAllBytes(Path.Combine(this.Info.Location.Replace("SigilADay.dll",""),"Artwork/ability_silence.png"));
Texture2D tex = new Texture2D(2,2);
tex.LoadImage(imgBytes);

NewAbility ability = new NewAbility(info,typeof(Silence),tex,AbilityIdentifier.GetAbilityIdentifier(PluginGuid, info.rulebookName));
Silence.ability = ability.ability;
return ability;
}
}

public class Silence : CustomAbilityBehaviour
{
public override bool RespondsToPlayFromHand()
{
return true;
}

public override IEnumerator OnPlayFromHand()
{
yield return base.PreSuccessfulTriggerSequence();
yield return base.LearnAbility(0.25f);
yield break;
}
}
}
79 changes: 79 additions & 0 deletions sigils/Transient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using APIPlugin;
using DiskCardGame;

namespace SigilADay
{
public partial class Plugin
{
private NewAbility AddTransient()
{
AbilityInfo info = ScriptableObject.CreateInstance<AbilityInfo>();
info.powerLevel = 3;
info.rulebookName = "Transient";
info.rulebookDescription = "[creature] will return to your hand at the end of the turn.";
info.metaCategories = new List<AbilityMetaCategory> {AbilityMetaCategory.Part1Rulebook, AbilityMetaCategory.Part1Modular};

List<DialogueEvent.Line> lines = new List<DialogueEvent.Line>();
DialogueEvent.Line line = new DialogueEvent.Line();
line.text = "The creature blinks back into the owner's hand at the end of their turn.";
lines.Add(line);
info.abilityLearnedDialogue = new DialogueEvent.LineSet(lines);

byte[] imgBytes = System.IO.File.ReadAllBytes(Path.Combine(this.Info.Location.Replace("SigilADay.dll",""),"Artwork/ability_transient.png"));
Texture2D tex = new Texture2D(2,2);
tex.LoadImage(imgBytes);

NewAbility ability = new NewAbility(info,typeof(Transient),tex,AbilityIdentifier.GetAbilityIdentifier(PluginGuid, info.rulebookName));
Transient.ability = ability.ability;
return ability;
}
}

public class Transient : DrawCreatedCard
{
public override Ability Ability
{
get
{
return ability;
}
}

public static Ability ability;

private void Start()
{
this.copy = CardLoader.Clone(base.Card.Info);
}

public override CardInfo CardToDraw
{
get
{
return CardLoader.Clone(this.copy);
}
}

public override bool RespondsToTurnEnd(bool playerTurnEnd)
{
return playerTurnEnd;
}

public override IEnumerator OnTurnEnd(bool playerTurnEnd)
{
yield return base.PreSuccessfulTriggerSequence();
yield return base.CreateDrawnCard();
base.Card.Anim.PlayDeathAnimation(false);
base.Card.UnassignFromSlot();
base.Card.StartCoroutine(base.Card.DestroyWhenStackIsClear());
base.Card.Slot = null;
yield break;
}

private CardInfo copy;
}
}

0 comments on commit 972a502

Please sign in to comment.