Commit 1568202 1 parent b65e8d2 commit 1568202 Copy full SHA for 1568202
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -230,8 +230,10 @@ export default class YearZeroCombatant extends Combatant {
230
230
231
231
/* ------------------------------------------ */
232
232
#getSingleActionStatus( combatant ) {
233
- const as = combatant . combat . turns . filter ( t => t . tokenId === combatant . tokenId ) ;
234
- for ( let i = 0 ; i < as . length && i < YZEC . StatusEffects . singleAction . length ; i ++ ) {
233
+ const as = combatant . combat . turns
234
+ . filter ( t => t . tokenId === combatant . tokenId )
235
+ . slice ( 0 , YZEC . StatusEffects . singleAction . length ) ;
236
+ for ( let i = 0 ; i < as . length ; i ++ ) {
235
237
as [ i ] = {
236
238
id : as [ i ] . id ,
237
239
action : as [ i ] . token . hasStatusEffect ( YZEC . StatusEffects . singleAction [ i ] . id ) ,
@@ -244,6 +246,7 @@ export default class YearZeroCombatant extends Combatant {
244
246
const post = this . #getSingleActionStatus( combatant ) ;
245
247
for ( let i = 0 ; i < post . length ; i ++ ) {
246
248
const preIndex = preCombatantActions . findIndex ( e => e . id === post [ i ] . id ) ;
249
+ if ( preIndex < 0 ) continue ;
247
250
const preAction = preCombatantActions [ preIndex ] . action ;
248
251
const postAction = post [ i ] . action ;
249
252
if ( preAction != postAction ) {
You can’t perform that action at this time.
0 commit comments