“Can you find your book here?” A fight breaks out between the guests and the librarians, as if on a stage. The defeated guests turn into books, and the Library gets bigger. And finally get your hands on it… The one, perfect book. The information you need for card and dice effects as you progress through this adventure is in our Library Of Ruina DLL Card and Dice Effects (Coding) guide!
Library Of Ruina DLL Card and Dice Effects (Coding)
Welcome to our Library Of Ruina DLL Card and Dice Effects (Coding) guide. Here is some DLL help for coding card effects and dice effects.
Starting Out
This is how every Card effect will start out. XXX is the name of your passive. Desc is what the game will say your effect does on the card.
public class DiceCardSelfAbility_XXX : DiceCardSelfAbilityBase
{
public static string Desc = “On Use 1 Strength.”;
}
This is how every Dice effect will start out. Dice effects tend to have smaller text, so you may want to put very long dice effects in the card effect description. If your card doesn’t have an effect, but the dice has a long description you can just make a description and leave the actual card effect empty.
public class DiceCardAbility_XXX : DiceCardAbilityBase
{
public static string Desc = “On Hit inflict 8 Burn.”;
}
For an example of a card effect. name space should already be there. It is just your code’s name. This card gives 3 Burn and 1 Strength on use.
namespace My_Mod
{
public class DiceCardSelfAbility_BurnStrength : DiceCardSelfAbilityBase
{
public static string Desc = “On Use gain 3 Burn and 1 Strength.”;
public override void OnUseCard()
{
owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Burn, 3, this.owner);
owner.bufListDetail.AddKeywordBufByEtc(KeywordBuf.Strength, 1, this.owner);
}
}
}
For an example of a Dice effect. This dice rolls itself twice, but will fail if you are staggered. repeatCount goes up once when rolling the first time. Then repeatCount is 1, so it doesn’t give you a third roll. If staggered after the first roll ends the effect returns and doesn’t give the second roll.
namespace My_Mod
{
public class DiceCardAbility_XXXX : DiceCardAbilityBase
{
public static string Desc = “This is rolled Twice.”;
private int _repeatCount;
public override void AfterAction()
{
if (this.owner.IsBreakLifeZero() || this._repeatCount >= 1)
return;
++this._repeatCount;
this.ActivateBonusAttackDice();
}
}
}
For an example of just using the card effect for a dice description. Just give the card the effect and your description will be easier to read at the top of the card instead of next to the dice. You could use this for multiple dice, but that can become hard to read and understand.
namespace My_Mod
{
public class DiceCardSelfAbility_SuperCoolEffect : DiceCardSelfAbilityBase
{
public static string Desc = “When the dice is red it looks like a block dice, but if you think yellow is a cool color add +15 to the effect. Do you like this card artwork? I worked really hard on it. Pls read my book story. What did this dice do again?.”;
}
}
Canard
Where it all starts.
Rats
Even rats have dice effects. A whole 2 of them.
Bleed on Hit-bleeding1atk
public override string[] Keywords => new string[1]
{
“Bleeding_Keyword”
};
public override void OnSucceedAttack() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Bleeding, 1, this.owner);
- The Keywords thing only matters for passives like Master Smoker or Charge Mastery. The Keyword is what they check for, and it is the little side tips when you hover over the card.
- You can change that 1 to any number to change how much Bleed is inflicted.
- This is a dice on hit effect.
Bleed on Clash Win-bleeding2pw
public override string[] Keywords => new string[1]
{
“Bleeding_Keyword”
};
public override void OnWinParrying() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Bleeding, 2, this.owner);
- In this fight only Dirty Blow uses this.
- This is a dice on clash win effect.
- Both of these could be written as this if you wanted.
public override void OnWinParrying()
{
this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Bleeding, 2, this.owner);
}
Yun Office
Yun fixer grunts have no card effects.
Finn
Struggle_protection2
public override string[] Keywords => new string[1]
{
“Protection_Keyword”
};
public override void OnUseCard() => this.card.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Protection, 2, this.owner);
- This is a card on use effect.
- Use AddKeywordBufThisRoundByCard for Protection this scene.
Preparation-energy1pw
public override string[] Keywords => new string[1]
{
“Energy_Keyword”
};
public override void OnWinParrying() => this.owner.cardSlotDetail.RecoverPlayPointByCard(1);
This is a dice on clash win effect.
Yun
Commandering-protection1friend
public override string[] Keywords => new string[1]
{
“Protection_Keyword”
};
public override void OnUseCard()
{
foreach (BattleUnitModel alive in BattleObjectManager.instance.GetAliveList(this.card.owner.faction))
alive.bufListDetail.AddKeywordBufByCard(KeywordBuf.Protection, 1, this.owner);
}
This is a card on use effect.
You’re Too Slow
Dice 1-powerUpNext2pw
public override void OnWinParrying() => this.card.AddDiceAdder(DiceMatch.NextDice, 2);
This is a dice on clash win effect.
Dice 2-vulnerable2atk
public override string[] Keywords => new string[1]
{
“Vulnerable_Keyword”
};
public override void OnSucceedAttack() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Vulnerable, 2, this.owner);
This is a dice on hit effect.
Eri
Time for a Little Test-downgradeNext1pw
public override void OnWinParrying() => this.card.target?.currentDiceAction?.AddDiceFace(DiceMatch.NextDice, -1);
- Dice face changes max rolls by 3 per face. -1 would be -3 max roll.
- This is a dice on clash win effect.
Feelin’ Good is the same dice effect as dice 2 on Your Too Slow. Just change 2 to a 1.
Brother Hood of Iron
Mo
E-endure
Dice 2-paralysis1pw
public override string[] Keywords => new string[1]
{
“Paralysis_Keyword”
};
public override void OnWinParrying() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Paralysis, 1, this.owner);
This is an on clash win dice effect.
Dice-3-paralysis1atk
public override string[] Keywords => new string[1]
{
“Paralysis_Keyword”
};
public override void OnSucceedAttack() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Paralysis, 1, this.owner);
This is an on hit dice effect.
Consta
D-dried Up-strength2
public override string[] Keywords => new string[1]
{
“Strength_Keyword”
};
public override void OnUseCard() => this.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Strength, 2, this.owner);
This is a card on use effect.
Quickness-quickness1
public override string[] Keywords => new string[1]
{
“Quickness_Keyword”
};
public override void OnUseCard() => this.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Quickness, 1, this.owner);
This is a card on use effect.
Arnold
C-charge Up-energy1paralysis1
public override string[] Keywords => new string[2]
{
“Paralysis_Keyword”,
“Energy_Keyword”
};
public override void OnUseCard()
{
this.owner.cardSlotDetail.RecoverPlayPointByCard(1);
this.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Paralysis, 1, this.owner);
}
- This card has 2 effects.
- This is an on use card effect.
Hook Office
Taein and McCullin
They have nothing unique, but just putting Naoki here feels weird.
Track-recoverHp1
public override string[] Keywords => new string[1]
{
“Recover_Keyword”
};
public override void OnUseCard() => this.owner.RecoverHP(1);
- How is this one of the only on use recover pages in the game?
- This is a card on use effect.
Mutilate-recoverHp1atk
public override string[] Keywords => new string[1]
{
“Recover_Keyword”
};
public override void OnSucceedAttack() => this.card.owner.RecoverHP(1);
This is a dice on hit effect.
Naoki
Fend This Off If you Can
Dice-1-downgradeNext1pw
public override void OnWinParrying() => this.card.target?.currentDiceAction?.AddDiceFace(DiceMatch.NextDice, -1);
- Each Face moves 3 max roll values.
- This is a dice on clash win effect.
Dice-2-bleeding2atk
public override void OnSucceedAttack() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Bleeding, 2, this.owner);
This is a dice on hit effect.
Urban Myth
Pierre’s Bistro
Pierre
I Can Cook Anything-recoverHp4atk
public override string[] Keywords => new string[1]
{
“Recover_Keyword”
};
public override void OnSucceedAttack() => this.card.owner.RecoverHP(4);
- Dice on hit effect.
- This Technically isn’t new because Hook does recovery, but the art.
Ingredient Hunt-binding2atk
public override string[] Keywords => new string[1]
{
“Binding_Keyword”
};
public override void OnSucceedAttack() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Binding, 2, this.owner);
Dice on hit effect.
Jack
Cruelty-pierre
public override string[] Keywords => new string[2]
{
“Bleeding_Keyword”,
“Recover_Keyword”
};
public override void OnSucceedAttack()
{
int? kewordBufStack = this.card.target?.bufListDetail.GetKewordBufStack(KeywordBuf.Bleeding);
int? nullable = kewordBufStack;
int num = 0;
if (!(nullable.GetValueOrDefault() > num & nullable.HasValue))
return;
BattleUnitModel owner = this.owner;
nullable = kewordBufStack;
int v = nullable ?? 0;
owner.RecoverHP(v);
}
- Poor Jack Pierre is literally the name of this effect.
- You can change Bleeding to any status ailment to change what you heal from. For example KeywordBuf.Binding and now you heal equal to target’s Bind.
- Dice on hit effect.
StreetLight
San
Silent Night-endurance2
public override string[] Keywords => new string[1]
{
“Endurance_Keyword”
};
public override void OnUseCard() => this.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Endurance, 2, this.owner);
Card On Use.
Mars
Fleet Footsteps-recoverHp2dfn
public override string[] Keywords => new string[1]
{
“Recover_Keyword”
};
public override void OnWinParryingDefense() => this.card.owner.RecoverHP(2);
- I believe the on defense effect is different than on clash win, but I don’t remember how.
- On Defense dice effect.
Prepared Mind-endurance1pw
public override string[] Keywords => new string[1]
{
“Endurance_Keyword”
};
public override void OnWinParrying() => this.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Endurance,
On Clash win Dice effect.
Lulu-1
Set Fire-ruru2
public override string[] Keywords => new string[1]
{
“Burn_Keyword”
};
public override void OnSucceedAttack()
{
this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Burn, 3, this.owner);
this.owner.TakeDamage(3, DamageType.Card_Ability);
}
On hit dice effect
Taste My Flaming Bat!
Dice-2-upgradeNext1pw
public override void OnWinParrying() => this.card.AddDiceMaxValue(DiceMatch.NextDice, 3);
On Clash win dice effect.
Dice-3-burn2atk
public override string[] Keywords => new string[1]
{
“Burn_Keyword”
};
public override void OnSucceedAttack() => this.card.target?.bufListDetail.AddKeywordBufByCard(KeywordBuf.Burn, 2, this.owner);
On hit dice effect.
Lulu’s Friend
Quick Attack-quickness2
public override string[] Keywords => new string[1]
{
“Quickness_Keyword”
};
public override void OnUseCard() => this.owner.bufListDetail.AddKeywordBufByCard(KeywordBuf.Quickness, 2, this.owner);
- How is the only new effect in the second fight?
- On Use card effect.