Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is my suggestion:</p> <p>Note the usage of the enum definition to enable the machinery</p> <pre><code>enum AttackFlags { Contact = 1ul &lt;&lt; 0, // Move connects with target Projectile = 1ul &lt;&lt; 1, // Attack is projectile based Unblockable = 1ul &lt;&lt; 2, // Attack can not be blocked UncounterableLv1 = 1ul &lt;&lt; 3, // Attack can't be countered except by extreme counter attack skills/status effects UncounterableLv2 = 1ul &lt;&lt; 4, // Attack can not be countered Flinches = 1ul &lt;&lt; 5, // Has a chance to stun the enemy, pushing back their next turn Unreflectable = 1ul &lt;&lt; 6, // Attack penetrates reflect. Only checked for Magic attacks IgnoreDefenderStatusEffects = 1ul &lt;&lt; 7, // Ignores active status effects on the defender IgnoreAttackerStatusEffects = 1ul &lt;&lt; 8, // Ignores active status effects on the attacker IgnoreDefenderAbilities = 1ul &lt;&lt; 9, // Ignore the defenders abilities IgnoreAttackerAbilities = 1ul &lt;&lt; 10, // Ignore the attackers abilities IgnoreArmorRating = 1ul &lt;&lt; 11, // Ignore the defensive boosts of armor IgnoreWeaponRating = 1ul &lt;&lt; 12, // Ignore the attack boost from weapons HighCritical = 1ul &lt;&lt; 13, // The move has an increased chance to crit CausesStatus = 1ul &lt;&lt; 14, // Can the move cause status effects? Elemental = 1ul &lt;&lt; 15, // Is the move elemental based? Unimplemented = 1ul &lt;&lt; 16, // has the move been implemented yet? ModsTimer = 1ul &lt;&lt; 17, // Does it have an effect on the target or users timer? Heals = 1ul &lt;&lt; 18, // Does the move heal? SecondaryEffects = 1ul &lt;&lt; 19, // Attack has additional effects besides basic attack PhysicalAttackFlag = 1ul &lt;&lt; 20, // Is the Class Physically based? I.E. blocked by Protect and Shield MagicAttackFlag = 1ul &lt;&lt; 21, // Is the move Magically Based? I.E. is it affected by things like Shell MultiHit = 1ul &lt;&lt; 22, // Does it enxcapsulate more then 1 hit SingleUse = 1ul &lt;&lt; 23, // Attack can only be used once per battle DoesNotCauseDamage = 1ul &lt;&lt; 24, MaskAttack = MagicAttackFlag | PhysicalAttackFlag, MaskIgnore = IgnoreWeaponRating | IgnoreArmorRating | IgnoreAttackerAbilities | IgnoreDefenderAbilities | IgnoreAttackerStatusEffects, // etc }; static bool HasAttackFlag(AttackFlags flags) { return flags &amp; MaskAttack; } static bool HasIgnoreFlag(AttackFlags flags) { return flags &amp; MaskIgnore; } </code></pre> <p>As an added bonus, consider a way to return only 'miscellanous' (un-masked, so to speak) flags:</p> <pre><code>static AttackFlags MiscFlags(AttackFlags flags) { return (AttackFlags) (flags &amp; ~(MaskAttack | MaskIgnore)); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload