<commit_before>var effectElements = {
    triggers: {
        onEndTurn: function() {},
        onStartTurn: function() {},
        onStartGame: function() {},

        onSelfPlayerDamage: function() {},
        onOpponentPlayerDamage: function() {},
        onAnyPlayerDamage: function() {},

        onSelfCardDamage: function() {},
        onSelfCardDeath: function() {},
        onOpponentCardDamage: function() {},
        onOpponentCardDeath: function() {},
        onSelfSpecificCardDeath: function() {},
        onOpponentSpecificCardDeath: function() {}
    },
    actions: {
        damage: function() {},
        heal: function() {},
        drawCard: function() {},
        burnCard: function() {},

        addAttack: function() {},
        addHealth: function() {},

        giveRush: function() {},
        giveRanged: function() {},
        giveTaunt: function() {},
        giveWait: function() {}
    },
    targets: {
        selfPlayer: function() {},
        opponentPlayer: function() {},
        allPlayers: function() {},

        selfCards: function() {},
        opponentCards: function() {},
        allCards: function() {},

        selfDeck: function() {},
        opponentDeck: function() {},
        allDecks: function() {},

        selfBoard: function() {},
        opponentBoard: function() {},
        allBoards: function() {}
    },
    others: {
        chance: function(probability) {
            if (probability > 1) {
                probability = 1;
            }
            if (probability < 0) {
                probability = 0;
            }
            if ((typeof probability) !== "number" && isNaN(probability)) {
                return NaN;
            } else {
                var roll = Math.random();
                return (roll <= probability);
            }
        }
    }
};<commit_msg>Update EffectElements.js<commit_after>var ZoneComponent = Java.type("com.cardshifter.modapi.cards.ZoneComponent");
var PlayerComponent = Java.type("com.cardshifter.modapi.base.PlayerComponent");
var DeckConfigFactory = Java.type("net.zomis.cardshifter.ecs.config.DeckConfigFactory");
var ConfigComponent = Java.type("net.zomis.cardshifter.ecs.config.ConfigComponent");
var PhrancisResources = Java.type("net.zomis.cardshifter.ecs.usage.PhrancisGame.PhrancisResources");

/** 
 * Map that represents various card resources:
 * MAX_HEALTH, SNIPER, DOUBLE_ATTACK, TAUNT, DENY_COUNTERATTACK, HEALTH, MANA, MANA_MAX, SCRAP, 
 * ATTACK, MANA_COST, SCRAP_COST, ENCHANTMENTS_ACTIVE, SICKNESS, ATTACK_AVAILABLE
 */
var ECSResourceMap = Java.type("com.cardshifter.modapi.resources.ECSResourceMap");
/** 
 * Map that represents various card attributes:
 * NAME, FLAVOR
 */
var ECSAttributeMap = Java.type("com.cardshifter.modapi.attributes.ECSAttributeMap");
var baseMod = Java.type("net.zomis.cardshifter.ecs.usage.PhrancisGame");
var Attributes = Java.type("com.cardshifter.modapi.attributes.Attributes");

/**
 * EFFECT ELEMENTS LIST
 */

var effectElements = {
    triggers: {
        onEndTurn: function() {},
        onStartTurn: function() {},
        onStartGame: function() {},

        onSelfPlayerDamage: function() {},
        onOpponentPlayerDamage: function() {},
        onAnyPlayerDamage: function() {},

        onSelfCardDamage: function() {},
        onSelfCardDeath: function() {},
        onOpponentCardDamage: function() {},
        onOpponentCardDeath: function() {},
        onSelfSpecificCardDeath: function() {},
        onOpponentSpecificCardDeath: function() {}
    },
    targets: {
        selfPlayer: function() {},
        opponentPlayer: function() {},
        allPlayers: function() {},

        selfCards: function() {},
        opponentCards: function() {},
        allCards: function() {},

        selfDeck: function() {},
        opponentDeck: function() {},
        allDecks: function() {},

        selfBoard: function() {},
        opponentBoard: function() {},
        allBoards: function() {}
    },
    actions: {
        damage: function() {},
        heal: function() {},
        drawCard: function() {},
        burnCard: function() {},

        addAttack: function() {},
        addHealth: function() {},

        giveRush: function() {},
        giveRanged: function() {},
        giveTaunt: function() {},
        giveWait: function(turns, target) {
            /** EXAMPLE CODE - THIS WOULD NOT ACTUALLY WORK - ECS MAP CALL IS WRONG */
            1 += turns;
            ECSResourceMap.createFor(target).set(Resources.SICKNESS, turns);
        }
    },
    others: {
        chance: function(probability) {
            if (probability > 1) { probability = 1; }
            if (probability < 0) { probability = 0; }
            if ((typeof probability) !== "number" && isNaN(probability)) {
                return NaN;
            } else {
                var roll = Math.random();
                return (roll <= probability);
            }
        }
    }
};
{'fraction_non_alphanumeric': 0.14219255663430422, 'fraction_numerical': 0.0018203883495145632, 'mean_word_length': 2.3412162162162162, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4533128', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1376, 'n_words': 277}