+
+
+ WHEN
+
+
+
+
+
+ {#if rule.trigger.type === 'onTimer'}
+
+ every
+ setParam(rule.trigger.params, 'seconds', e.currentTarget.value)}
+ class="w-12 rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ min="0.1"
+ step="0.5"
+ />
+ sec
+
+ {/if}
+ {#if rule.trigger.type === 'onHpBelow'}
+
+ HP below
+ setParam(rule.trigger.params, 'threshold', e.currentTarget.value)}
+ class="w-12 rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ />
+
+ {/if}
+
+
+ {#each rule.actions as action, ai}
+
+
+ {ai === 0 ? 'THEN' : 'AND'}
+
+
+
+
+
+
+
+ {#if action.type === 'damage' || action.type === 'heal'}
+ setParam(action.params, 'amount', e.currentTarget.value)}
+ class="w-12 rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ placeholder="amt"
+ />
+ {/if}
+ {#if action.type === 'particle'}
+
+ {/if}
+ {#if action.type === 'sound'}
+
+ {/if}
+ {#if action.type === 'deletePixel' || action.type === 'setPixel'}
+ setParam(action.params, 'radius', e.currentTarget.value)}
+ class="w-12 rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ placeholder="radius"
+ min="1"
+ max="10"
+ />
+ {/if}
+ {#if action.type === 'message'}
+ setParam(action.params, 'text', e.currentTarget.value)}
+ class="w-full rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ placeholder="Message text..."
+ />
+ {/if}
+ {#if action.type === 'wait'}
+ setParam(action.params, 'seconds', e.currentTarget.value)}
+ class="w-12 rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ placeholder="sec"
+ min="0.1"
+ step="0.1"
+ />
+ {/if}
+ {#if action.type === 'cameraShake'}
+ setParam(action.params, 'intensity', e.currentTarget.value)}
+ class="w-12 rounded bg-gray-700 px-1 py-0.5 text-xs text-white outline-none"
+ placeholder="1-10"
+ min="1"
+ max="10"
+ />
+ {/if}
+
+ {/each}
+
+
+