Class FlameCost
A Grimmkin Flame cost with options to act cumulatively.
Assembly: ItemChanger.dll
Syntax
public record FlameCost : Cost, IEquatable<Cost>, IEquatable<FlameCost>
Constructors
View Source
FlameCost(FlameCost)
Declaration
protected FlameCost(FlameCost original)
Parameters
View Source
FlameCost(int, bool, bool)
A Grimmkin Flame cost with options to act cumulatively.
Declaration
public FlameCost(int amount, bool cumulative, bool subtractive)
Parameters
| Type |
Name |
Description |
| int |
amount |
The number of flames.
|
| bool |
cumulative |
Should the cost compare against the cumulative flames collected, or the current balance?
|
| bool |
subtractive |
Should paying the cost increment the cumulative flames spent, and decrease the current balance?
|
Properties
View Source
EqualityContract
Declaration
protected override Type EqualityContract { get; }
Property Value
Overrides
View Source
amount
Declaration
public int amount { get; init; }
Property Value
View Source
cumulative
Should the cost compare against the cumulative flames collected, or the current balance?
Declaration
public bool cumulative { get; init; }
Property Value
View Source
subtractive
Should paying the cost increment the cumulative flames spent, and decrease the current balance?
Declaration
public bool subtractive { get; init; }
Property Value
Methods
View Source
CanPay()
Returns whether the cost can currently be paid.
Declaration
public override bool CanPay()
Returns
Overrides
View Source
Deconstruct(out int, out bool, out bool)
Declaration
public void Deconstruct(out int amount, out bool cumulative, out bool subtractive)
Parameters
| Type |
Name |
Description |
| int |
amount |
|
| bool |
cumulative |
|
| bool |
subtractive |
|
View Source
Equals(Cost?)
Declaration
public override sealed bool Equals(Cost? other)
Parameters
| Type |
Name |
Description |
| Cost |
other |
|
Returns
Overrides
View Source
Equals(FlameCost?)
Declaration
public virtual bool Equals(FlameCost? other)
Parameters
Returns
View Source
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
GetCostText()
Method which provides the cost text used in y/n prompts.
Declaration
public override string GetCostText()
Returns
Overrides
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
HasPayEffects()
Does paying this cost have effects (particularly that could prevent paying other costs of the same type)?
Declaration
public override bool HasPayEffects()
Returns
Overrides
View Source
OnPay()
Method for administering all effects of the cost during Pay.
Declaration
public override void OnPay()
Overrides
View Source
PrintMembers(StringBuilder)
Declaration
protected override bool PrintMembers(StringBuilder builder)
Parameters
Returns
Overrides
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(FlameCost?, FlameCost?)
Declaration
public static bool operator ==(FlameCost? left, FlameCost? right)
Parameters
Returns
View Source
operator !=(FlameCost?, FlameCost?)
Declaration
public static bool operator !=(FlameCost? left, FlameCost? right)
Parameters
Returns
Implements
Extension Methods