When a new ruleset Template is created and I set the win condition to Enemy_hp_is_zero or lose condition to Player_hp_is_zero, IndexOutofRangeException triggers.
The former one produces this error log:
IndexOutOfRangeException: Index was outside the bounds of the array.
RulesetTemplateEditor.ArmorBattle_CharacterInfo (Character thisCharacter) (at Assets/3match/Editor/RulesetTemplateEditor/RulesetTemplateEditor_ArmorBattle.cs:31)
RulesetTemplateEditor.PlayerHpIsZero () (at Assets/3match/Editor/RulesetTemplateEditor/LoseConditions/RulesetTemplateEditor_PlayerHPisZero.cs:26)
RulesetTemplateEditor.MainRules () (at Assets/3match/Editor/RulesetTemplateEditor/RulesetTemplateEditor_MainRules.cs:139)
RulesetTemplateEditor.OnInspectorGUI () (at Assets/3match/Editor/RulesetTemplateEditor/RulesetTemplateEditor.cs:16)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b__0 () (at <13e852a0caac41f981d50cc29ae40ac7>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
and the latter one this:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <46a5f68c38604d68a85231bbf55f6b8f>:0)
RulesetTemplateEditor.EnemyHpIsZero () (at Assets/3match/Editor/RulesetTemplateEditor/WinConditions/RulesetTemplateEditor_EnemyHPisZero.cs:27)
RulesetTemplateEditor.MainRules () (at Assets/3match/Editor/RulesetTemplateEditor/RulesetTemplateEditor_MainRules.cs:118)
RulesetTemplateEditor.OnInspectorGUI () (at Assets/3match/Editor/RulesetTemplateEditor/RulesetTemplateEditor.cs:16)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b__0 () (at <13e852a0caac41f981d50cc29ae40ac7>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
Seems like Bonus Rules => give bonus => After_big_explosion in the new ruleset template give a similar error:
IndexOutOfRangeException: Index was outside the bounds of the array.
RulesetTemplateEditor.GiveBonus_AfterBigExplosion () (at Assets/3match/Editor/RulesetTemplateEditor/Bonus/RulesetTemplateEditor_Bonus_AfterBigExplosion.cs:32)
RulesetTemplateEditor.BonusRules () (at Assets/3match/Editor/RulesetTemplateEditor/Bonus/RulesetTemplateEditor_Bonus.cs:33)
RulesetTemplateEditor.OnInspectorGUI () (at Assets/3match/Editor/RulesetTemplateEditor/RulesetTemplateEditor.cs:18)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b__0 () (at <13e852a0caac41f981d50cc29ae40ac7>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
ⓐ new matching mechanism and a new special bomb
Most 3-match games nowadays have introduced a new matching mechanism, which requires 4 gems to be swapped in a form of a 2x2 box like this:
■■
■■
This produces a special bomb (typically something similar to an airplane) that will snipe stage target when triggered. For example, if the player is required to collect tokens, it will destroy a tile right below one of the tokens on board to help clear it out.
Wanted to and tried to code them myself, but my programming ability is pretty much limited.
ⓑ bomb combinations
Many 3 match games use bomb combinations when swapping two bombs.
For examples:
- a “horizontal bomb” combined with a “big explosion bomb” clears 3 horizontal and 3 vertical blocks.
- a “rainbow bomb” combined with a “horizontal bomb” changes the rarest colored gem blocks on the board to horizontal bombs.
- an “airplane bomb” combined with another “airplane bomb” triggers 3 successive times.
This mechanism makes 3 match games more engaging and exciting. It would be good to have them.
ⓒ etc
I also believe that some variables in the Board_C script(Number of tokens emitted and Ice grow-related ones) are more fit to be in the ruleset template. Just food for thought.
This is a very solid tool. I want to praise you for the good and only 3 matching games making tools in the asset store.
P.S. Do you plan to update or rewrite the code in the near future? I am planning to learn through your code. If you do, I can wait.