<commit_before>#!/usr/bin/env python3

import sys, os

# now that we're in directory 'tools/' we have to update sys.path
sys.path.append(os.path.dirname(sys.path[0]))

from parameters import *
from helpers import *
from smboolmanager import *
from utils import PresetLoader

def stuff(base, nEtanks, nMissiles, nSupers, nPowerBombs):
    ret = base
    ret.extend(['ETank'] * nEtanks)
    ret.extend(['Missile'] * nMissiles)
    ret.extend(['Super'] * nSupers)
    ret.extend(['PowerBomb'] * nPowerBombs)
    return ret

itemSets = {
    'Kraid' : {
        'Standard' : stuff(['Spazer', 'Charge'], 1, 4, 1, 0),
        'ChargeLess' : stuff([], 1, 4, 1, 0),
        'NoTanks' : stuff(['Spazer', 'Charge'], 0, 4, 1, 0),
    },
    'Phantoon' : {
        'Standard' : stuff(['Spazer', 'Charge', 'Wave', 'Varia'], 5, 6, 1, 1),
        'ChargeLess' : stuff(['Varia'], 5, 6, 3, 1),
        'Tough' : stuff(['Charge', 'Wave'], 5, 3, 1, 1),
        'VeryTough': stuff(['Charge'], 1, 2, 1, 1),
        'NoTanks': stuff(['Charge'], 0, 2, 1, 1),
    },
    'Draygon' : {
        'Standard' : stuff(['Spazer', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 7, 10, 4, 3),
        'ChargeLess' : stuff(['Varia', 'Gravity'], 7, 10, 6, 3),
        'Tough' : stuff(['Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 5, 8, 2, 3),
    },
    'Ridley' : {
        'Standard' : stuff(['Plasma', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 7, 10, 6, 3),
        'ChargeLess' : stuff(['Varia', 'Gravity'], 9, 10, 9, 3),
        'Tough' : stuff(['Spazer', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 4, 10, 3, 3),
        'Crazy' : stuff(['Charge', 'Varia'], 1, 2, 1, 1)
    },
    'MotherBrain' : {
        'Standard' : stuff(['Plasma', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 9, 10, 6, 3),
        'ChargeLess' : stuff(['Varia', 'Gravity'], 9, 10, 14, 3),
        'Tough' : stuff(['Spazer', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 5, 10, 5, 3)
    }
}

sm = SMBoolManager()#.factory('diff')

def boss(name, diffFunction):<commit_msg>tools: added phantoon config in boss test<commit_after>#!/usr/bin/env python3

import sys, os

# now that we're in directory 'tools/' we have to update sys.path
sys.path.append(os.path.dirname(sys.path[0]))

from parameters import *
from helpers import *
from smboolmanager import *
from utils import PresetLoader

def stuff(base, nEtanks, nMissiles, nSupers, nPowerBombs):
    ret = base
    ret.extend(['ETank'] * nEtanks)
    ret.extend(['Missile'] * nMissiles)
    ret.extend(['Super'] * nSupers)
    ret.extend(['PowerBomb'] * nPowerBombs)
    return ret

itemSets = {
    'Kraid' : {
        'Standard' : stuff(['Spazer', 'Charge'], 1, 4, 1, 0),
        'ChargeLess' : stuff([], 1, 4, 1, 0),
        'NoTanks' : stuff(['Spazer', 'Charge'], 0, 4, 1, 0),
    },
    'Phantoon' : {
        'Standard' : stuff(['Spazer', 'Charge', 'Wave', 'Varia'], 5, 6, 1, 1),
        'ChargeLess' : stuff(['Varia'], 5, 6, 3, 1),
        'ChargeLessSuitLess' : stuff([], 5, 6, 3, 1),
        'Tough' : stuff(['Charge', 'Wave'], 5, 3, 1, 1),
        'VeryTough': stuff(['Charge'], 1, 2, 1, 1),
        'NoTanks': stuff(['Charge'], 0, 2, 1, 1),
    },
    'Draygon' : {
        'Standard' : stuff(['Spazer', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 7, 10, 4, 3),
        'ChargeLess' : stuff(['Varia', 'Gravity'], 7, 10, 6, 3),
        'Tough' : stuff(['Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 5, 8, 2, 3),
    },
    'Ridley' : {
        'Standard' : stuff(['Plasma', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 7, 10, 6, 3),
        'ChargeLess' : stuff(['Varia', 'Gravity'], 9, 10, 9, 3),
        'Tough' : stuff(['Spazer', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 4, 10, 3, 3),
        'Crazy' : stuff(['Charge', 'Varia'], 1, 2, 1, 1)
    },
    'MotherBrain' : {
        'Standard' : stuff(['Plasma', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 9, 10, 6, 3),
        'ChargeLess' : stuff(['Varia', 'Gravity'], 9, 10, 14, 3),
        'Tough' : stuff(['Spazer', 'Charge', 'Wave', 'Ice', 'Varia', 'Gravity'], 5, 10, 5, 3)
    }
}

sm = SMBoolManager()#.factory('diff')

def boss(name, diffFunction):
{'fraction_non_alphanumeric': 0.23522286821705427, 'fraction_numerical': 0.041182170542635656, 'mean_word_length': 3.213265306122449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1260104', 'n_tokens_mistral': 1792, 'n_tokens_neox': 1573, 'n_words': 423}