Inscryption
This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Install with App

Details

Latest version
1.0.0
Last Updated
First Uploaded
Downloads
270
Likes
1
Size
73KB
Dependants

Tags

Deprecated

public void testboon() { CardInfo cardInfo= new CardInfo(); cardInfo.name = "TestBoon"; cardInfo.displayedName = "TestBoon"; cardInfo.cost = 2; byte[] imgBytes3 = System.IO.File.ReadAllBytes(staticpath.Replace("boonsapi.dll", "")+ "\lands\HuntGrounds.png"); Texture2D tex3 = new Texture2D(2, 2); tex3.LoadImage(imgBytes3); cardInfo.portraitTex = Sprite.Create(tex3, new Rect(0.0f, 0.0f, tex3.width, tex3.height), new Vector2(0.5f, 0.5f), 100.0f); cardInfo.baseAttack = 0; cardInfo.baseHealth = 0; cardInfo.hideAttackAndHealth = true; cardInfo.boon = BoonData.Type.None; cardInfo.metaCategories.Add(CardMetaCategory.ChoiceNode); cardInfo.description = "This doesnt look like i made this one"; cardInfo.appearanceBehaviour.Add(CardAppearanceBehaviour.Appearance.TerrainBackground); NewCard.Add(cardInfo); boonsapi.Plugin.boonandtheirtype.Add(cardInfo, typeof(testboontriggers)); boonsapi.Plugin.boondescription.Add("When get attacked heal for attacked damage");

    }

    public class testboontriggers : boonsapi.Plugin.baseboontriggers
    {
        public override bool RespondsToSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
        {
            if (slot.Card != null && attacker != null && attacker.OpponentCard)
            {
                return true; 
            }

            return false;
        }

        public override IEnumerator OnSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
        {
            if (slot.Card != null && attacker!=null && attacker.OpponentCard)
            {
                slot.Card.AddTemporaryMod(new CardModificationInfo(0, attacker.Attack));
            }
            yield break;
        }
    }
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.