Last updated | 2 years ago |
Total downloads | 226 |
Total rating | 1 |
Categories | Libraries Act I Act III |
Dependency string | Kopie-Kopie_PassiveCards_API-1.0.0 |
Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
API_dev-API
This plugin is a BepInEx plugin made for Inscryption as an API. It can currently create custom cards and abilities and inject them into the data pool, or modify existing cards in the card pool.
Preferred version: 1.13.0README
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;
}
}