code:
;-------------------------------------------------
;;; ★廃止済
;;; 汎用エネミーデータはXML\ENEMY_DATA.xmlに記述します
;;; 汎用エネミーデータはtools\eraFL_ゲームデータエディタ_v1.0より編集可能です
;-------------------------------------------------
; クエストやイベントに登場する基本的なエネミーのデータ
; ◆項目について
; @CC_ADDMOB_FROM_TABLEで参照
; ENEMY_DEF_NAME:定義上のエネミー名。一意であること
; MAX_HP:HP
; STR:戦闘値(ATTACKの値を直接参照するため未使用)
; MAG:魔術値
; ATTACK:攻撃力
; DEFFENCE:防御力 ダメージの割合軽減率
; ARMOR:軽減値 ダメージの実数軽減値
; AGILITY:行動値 高いほど行動順が早くなる
; HATE_RATE:敵視値 高いほど狙われやすくなる
; TARGETING:脅威選定ルーチン どのような基準で攻撃対象を選定するか
; ENEMY_ACTIVE_SKILL 適用するアクティブスキル[定義名:スキルレベル]の書式で指定。複数指定可
; ENEMY_PASSIVE_SKILL 適用するパッシブスキル[定義名:スキルレベル]の書式で指定。複数指定可
; ※定義名はSKILL_BATTLE.xmlのdefnameを参照
;
; @CC_GET_LOOT_FROMで参照する獲得アイテム、経験値
; DROP_ITEM_LIST:"ITEM_ID,個数,ドロップ率(千分率),"の書式で指定する※末尾の','を忘れないこと！
; 個数は'1-3'のように表記すると１～３個のいずれかの量をドロップする
; EXP:撃破時の獲得経験値
;-------------------------------------------------
@CC_ENEMY_DATA
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "野うさぎの群れ"
        ,"MAX_HP", 600
        ,"STR", 2
        ,"MAG", 0
        ,"ATTACK", 2
        ,"DEFENCE", 0
        ,"ARMOR", 40
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"DROP_ITEM_LIST", @"MONEY,100,1000,{ITEM_動物の肉},1-3,450,{ITEM_動物の革},1-3,300,RELIC_兎の尻尾,1,60,"
        ,"EXP", 1
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ゴブリン"
        ,"MAX_HP", 900
        ,"STR", 5
        ,"MAG", 0
        ,"ATTACK", 5
        ,"DEFENCE", 5
        ,"ARMOR", 75
        ,"AGILITY", 35
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[SKILL_USE_RATE:40][SEX_ATTACK_USE_RATE:60]"
        ,"ENEMY_ACTIVE_SKILL", "[ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,100,1000,{ITEM_動物の肉},1,300,{ITEM_動物の革},1,300,{ITEM_鉄鉱石},1-3,150,"
        ,"EXP", 1
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ゴブリンの群れ"
        ,"MAX_HP", 2700
        ,"STR", 30
        ,"MAG", 0
        ,"ATTACK", 30
        ,"DEFENCE", 15
        ,"ARMOR", 150
        ,"AGILITY", 35
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[SKILL_USE_RATE:40][SEX_ATTACK_USE_RATE:60]"
        ,"ENEMY_ACTIVE_SKILL", "[ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,100,1000,{ITEM_動物の肉},2-3,300,{ITEM_動物の革},2-3,300,{ITEM_銀鉱石},1,10,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ワーグ"
        ,"MAX_HP", 2800
        ,"STR", 40
        ,"MAG", 20
        ,"ATTACK", 40
        ,"DEFENCE", 15
        ,"ARMOR", 100
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低耐久
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:1][ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_動物の肉},1-3,450,{ITEM_魔獣の肉片},1-3,300,"
        ,"EXP", 1
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ならず者"
        ,"MAX_HP", 2000
        ,"STR", 30
        ,"MAG", 0
        ,"ATTACK", 30
        ,"DEFENCE", 15
        ,"ARMOR", 200
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[SKILL_USE_RATE:40][SEX_ATTACK_USE_RATE:60]"
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:1][ACT_TORN_CLOTH:1][ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,500,1000,{ITEM_鉄インゴット},1-3,300,{ITEM_ディナリア銀貨},1-3.300,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "アマゾネス"
        ,"MAX_HP", 2500
        ,"STR", 45
        ,"MAG", 0
        ,"ATTACK", 45
        ,"DEFENCE", 18
        ,"ARMOR", 220
        ,"AGILITY", 75
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低脅威
        ,"ENEMY_AI", "[SKILL_USE_RATE:40][SEX_ATTACK_USE_RATE:30]"
        ,"ENEMY_ACTIVE_SKILL", "[ACT_STUN_ENEMY:1][POISON_ATTACK:1][ACT_TORN_CLOTH:1][ACT_MOLESTATION:1][ACT_MOLESTATION_MALE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,750,1000,{ITEM_鉄インゴット},1-3,300,{ITEM_精液},1-5,200,{ITEM_媚薬},1-2,150,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "メスガキアマゾネス"
        ,"MAX_HP", 2000
        ,"STR", 50
        ,"MAG", 0
        ,"ATTACK", 50
        ,"DEFENCE", 20
        ,"ARMOR", 250
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低脅威
        ,"ENEMY_AI", "[SKILL_USE_RATE:40][SEX_ATTACK_USE_RATE:60]"
        ,"ENEMY_ACTIVE_SKILL", "[ACT_REACT:1][SMITE:1][ACT_TORN_CLOTH:1][ACT_MOLESTATION:1][ACT_MOLESTATION_MALE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,750,1000,{ITEM_鉄インゴット},1-3,300,{ITEM_精液},1-5,200,{ITEM_媚薬},1-2,150,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "冒険者・剣士"
        ,"MAX_HP", 2500
        ,"STR", 55
        ,"MAG", 0
        ,"ATTACK", 55
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:1]"
        ,"ENEMY_PASSIVE_SKILL", "[ARMOR_DECAY:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_鋼インゴット},1-2,400,{ITEM_ポーション},1-2,150"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "熟練冒険者・剣士"
        ,"MAX_HP", 3000
        ,"STR", 70
        ,"MAG", 0
        ,"ATTACK", 70
        ,"DEFENCE", 25
        ,"ARMOR", 300
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2][ACT_FATAL_ATTACK:1]"
        ,"ENEMY_PASSIVE_SKILL", "[ARMOR_DECAY:2]"
        ,"DROP_ITEM_LIST", @"MONEY,1400,1000,{ITEM_鋼インゴット},2-4,400,{ITEM_銀インゴット},1-3,300,{ITEM_ポーション},1-2,150"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "冒険者・魔術師"
        ,"MAX_HP", 2200
        ,"STR", 20
        ,"MAG", 40
        ,"ATTACK", 20
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_CAST_ATTACK_ALL:1]"
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_CAST_TOKEN:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_マナ結晶},1-3,500,{ITEM_ポーション},1-2,150,{ITEM_銀インゴット},1-3,150,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "熟練冒険者・魔術師"
        ,"MAX_HP", 2600
        ,"STR", 20
        ,"MAG", 60
        ,"ATTACK", 20
        ,"DEFENCE", 35
        ,"ARMOR", 280
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_CAST_ATTACK_ALL:2]"
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_CAST_TOKEN:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1400,1000,{ITEM_マナ結晶},2-5,500,{ITEM_ポーション},1-2,150,{ITEM_銀インゴット},1-3,300,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "剣闘士"
        ,"MAX_HP", 3200
        ,"STR", 65
        ,"MAG", 0
        ,"ATTACK", 65
        ,"DEFENCE", 28
        ,"ARMOR", 275
        ,"AGILITY", 75
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_鋼インゴット},1-2,400,{ITEM_ポーション},1-2,150"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "猛獣使い"
        ,"MAX_HP", 3000
        ,"STR", 65
        ,"MAG", 0
        ,"ATTACK", 65
        ,"DEFENCE", 25
        ,"ARMOR", 280
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_STUN_ENEMY:1][SMITE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1400,1000,{ITEM_魔獣の肉片},2-4,500,{ITEM_鞭},1,300,{ITEM_ポーション},1-2,150"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン"
        ,"MAX_HP", 1000
        ,"STR", 7
        ,"MAG", 0
        ,"ATTACK", 7
        ,"DEFENCE", 5
        ,"ARMOR", 80
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"DROP_ITEM_LIST", @"MONEY,125,1000,{ITEM_骨},1-2,500,{ITEM_鉄鉱石},1-2,200,"
        ,"EXP", 1
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・ファランクス"
        ,"MAX_HP", 1600
        ,"STR", 20
        ,"MAG", 0
        ,"ATTACK", 20
        ,"DEFENCE", 10
        ,"ARMOR", 160
        ,"AGILITY", 30
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FRONT_DEFENCE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,300,1000,{ITEM_骨},1-2,500,{ITEM_鉄インゴット},1-3,300,[RUNE:WPN_FRONT_DEFENCE][SKILL_LV:1],1,50,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・センチュリオン"
        ,"MAX_HP", 2200
        ,"STR", 30
        ,"MAG", 0
        ,"ATTACK", 30
        ,"DEFENCE", 20
        ,"ARMOR", 200
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,450,1000,{ITEM_骨},1-2,500,{ITEM_鉄インゴット},1-3,300,{ITEM_銀鉱石},1-3,100,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・ハスタティ"
        ,"MAX_HP", 2200
        ,"STR", 25
        ,"MAG", 0
        ,"ATTACK", 25
        ,"DEFENCE", 20
        ,"ARMOR", 250
        ,"AGILITY", 30
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FRONT_DEFENCE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,500,1000,{ITEM_骨},1-2,500,{ITEM_鋼インゴット},1-3,300,{ITEM_ディナリア銀貨},1-3,200,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・プリンキペス"
        ,"MAX_HP", 3000
        ,"STR", 40
        ,"MAG", 0
        ,"ATTACK", 40
        ,"DEFENCE", 30
        ,"ARMOR", 400
        ,"AGILITY", 30
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FRONT_DEFENCE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,500,1000,{ITEM_骨},1-2,500,{ITEM_鋼インゴット},2-5,300,{ITEM_ディナリア銀貨},2-5,200,{ITEM_銀鉱石},1-3,100,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・トリアリィ"
        ,"MAX_HP", 3800
        ,"STR", 45
        ,"MAG", 0
        ,"ATTACK", 45
        ,"DEFENCE", 35
        ,"ARMOR", 400
        ,"AGILITY", 30
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FRONT_DEFENCE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,750,1000,{ITEM_骨},1-2,500,{ITEM_鋼インゴット},2-5,400,{ITEM_ディナリア銀貨},2-5,350,{ITEM_金鉱石},1-3,75,[RUNE:WPN_FRONT_DEFENCE][SKILL_LV:2],1,50,"
        ,"EXP", 5
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・プラエトリアニ"
        ,"MAX_HP", 4000
        ,"STR", 75
        ,"MAG", 0
        ,"ATTACK", 75
        ,"DEFENCE", 40
        ,"ARMOR", 400
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:3]"
        ,"ENEMY_PASSIVE_SKILL", "[PSV_ENEMY_OPENING_ADD_BARRIER:3]"
        ,"DROP_ITEM_LIST", @"MONEY,1500,1000,{ITEM_骨},1-2,500,{ITEM_金インゴット},1-2,300,{ITEM_ディナリア銀貨},10-12,400,[RUNE:WPN_SMITE][SKILL_LV:3],1,5,"
        ,"EXP", 6
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スケルトン・カタフラクト"
        ,"MAX_HP", 4500
        ,"STR", 60
        ,"MAG", 0
        ,"ATTACK", 60
        ,"DEFENCE", 35
        ,"ARMOR", 350
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,1200,1000,{ITEM_骨},1-2,500,{ITEM_銀インゴット},1-2,300,{ITEM_ディナリア銀貨},6-8,400,{ITEM_金鉱石},1-3,75,"
        ,"EXP", 6
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "グール"
        ,"MAX_HP", 3000
        ,"STR", 30
        ,"MAG", 0
        ,"ATTACK", 30
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 65
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2][POISON_ATTACK:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1750,1000,{ITEM_魔獣の肉片},1-2,350,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ロックバード"
        ,"MAX_HP", 3600
        ,"STR", 65
        ,"MAG", 0
        ,"ATTACK", 65
        ,"DEFENCE", 20
        ,"ARMOR", 125
        ,"AGILITY", 130
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", ""
        ,"DROP_ITEM_LIST", @"MONEY,1250,1000,{ITEM_魔獣の肉片},1-2,350,{ITEM_鳥の羽},1-3,400,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ヒュージ・スラッグ"
        ,"MAX_HP", 3500
        ,"STR", 60
        ,"MAG", 0
        ,"ATTACK", 60
        ,"DEFENCE", 25
        ,"ARMOR", 125
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2][POISON_ATTACK:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_魔獣の肉片},1-2,350,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "エビルシャーク"
        ,"MAX_HP", 4000
        ,"STR", 50
        ,"MAG", 0
        ,"ATTACK", 50
        ,"DEFENCE", 20
        ,"ARMOR", 200
        ,"AGILITY", 140
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FATAL_ATTACK:1][ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2000,1000,{ITEM_動物性油},2-5,450,{ITEM_魔獣の肉片},3-4,50,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "メガロドン"
        ,"MAX_HP", 7500
        ,"STR", 90
        ,"MAG", 0
        ,"ATTACK", 90
        ,"DEFENCE", 30
        ,"ARMOR", 250
        ,"AGILITY", 140
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低耐久
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2][ACT_FATAL_ATTACK:1][ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_動物性油},8-10,450,{ITEM_魔獣の心核},1,50,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スキュレー・センチネル"
        ,"MAX_HP", 4200
        ,"STR", 55
        ,"MAG", 0
        ,"ATTACK", 55
        ,"DEFENCE", 20
        ,"ARMOR", 200
        ,"AGILITY", 150
        ,"HATE_RATE", 140
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:1][ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1500,1000,{ITEM_ローション},1-2,25,{ITEM_媚薬},1-2,10,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スキュレー・テンタクラー"
        ,"MAX_HP", 5000
        ,"STR", 65
        ,"MAG", 30
        ,"ATTACK", 75
        ,"DEFENCE", 30
        ,"ARMOR", 300
        ,"AGILITY", 50
        ,"HATE_RATE", 120
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2][ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_媚薬},1-2,25,{ITEM_ローション},2-4,25,{ITEM_サルマキス薬},1,5,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スキュレー・ソーサレス"
        ,"MAX_HP", 4000
        ,"STR", 30
        ,"MAG", 75
        ,"ATTACK", 30
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[SKILL_USE_RATE:35]"
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_CAST_TOKEN:1]"
        ,"ENEMY_ACTIVE_SKILL", "[ACT_ENEMY_HEAL:2][ACT_CAST_SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_媚薬},1-2,25,{ITEM_ローション},2-4,25,{ITEM_サルマキス薬},1,5,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "スキュレー・エヴゾネス"
        ,"MAX_HP", 6500
        ,"STR", 75
        ,"MAG", 35
        ,"ATTACK", 75
        ,"DEFENCE", 35
        ,"ARMOR", 350
        ,"AGILITY", 80
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FRONT_DEFENCE:2][SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_媚薬},1-2,35,{ITEM_サルマキス薬},1,5,{ITEM_銀インゴット},1-2,25,"
        ,"EXP", 10
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "クラーケン"
        ,"MAX_HP", 8000
        ,"STR", 75
        ,"MAG", 0
        ,"ATTACK", 75
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_魔獣の心核},1-2,350,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "クラーケンの触手"
        ,"MAX_HP", 4000
        ,"STR", 75
        ,"MAG", 0
        ,"ATTACK", 75
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_魔獣の肉片},1-2,350,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ムマキル"
        ,"MAX_HP", 6400
        ,"STR", 75
        ,"MAG", 0
        ,"ATTACK", 75
        ,"DEFENCE", 40
        ,"ARMOR", 400
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_動物の革},8-10,450,{ITEM_魔獣の心核},1,50,"
        +"[RUNE:WPN_TRAMPLE][SKILL_LV:1],1,50,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ムマキル・モールトゥス"
        ,"MAX_HP", 8000
        ,"STR", 75
        ,"MAG", 0
        ,"ATTACK", 75
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 20
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,3000,1000,{ITEM_骨},8-10,450,{ITEM_魔獣の心核},1,50,"
        +"[RUNE:WPN_TRAMPLE][SKILL_LV:1],1,50,[RUNE:WPN_TRAMPLE][SKILL_LV:2],1,5,"

        ,"EXP", 5
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "サラマンダー"
        ,"MAX_HP", 3500
        ,"STR", 75
        ,"MAG", 25
        ,"ATTACK", 75
        ,"DEFENCE", 35
        ,"ARMOR", 300
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FIRE_BREATH:2]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_硫黄},1-5,450,{ITEM_石炭},1-3,450,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ワイバーン"
        ,"MAX_HP", 4000
        ,"STR", 60
        ,"MAG", 0
        ,"ATTACK", 60
        ,"DEFENCE", 35
        ,"ARMOR", 300
        ,"AGILITY", 125
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_魔獣の肉片},1-5,450,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "エルダーワイバーン"
        ,"MAX_HP", 8000
        ,"STR", 120
        ,"MAG", 0
        ,"ATTACK", 120
        ,"DEFENCE", 45
        ,"ARMOR", 300
        ,"AGILITY", 180
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FIRE_BREATH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_魔獣の肉片},1-5,450,{ITEM_魔獣の心核},1-2,50,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "バロウワイト"
        ,"MAX_HP", 1000
        ,"STR", 15
        ,"MAG", 60
        ,"ATTACK", 15
        ,"DEFENCE", 15
        ,"ARMOR", 160
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FATAL_ATTACK:1][POISON_ATTACK:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1500,1000,{ITEM_骨},1-2,500,{ITEM_銀インゴット},1-2,300,"
        +"[RUNE:WPN_MAG_DEFENCE_UP][SKILL_LV:1],1,100,"

        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "バロウワイト・ハイロード"
        ,"MAX_HP", 3000
        ,"STR", 50
        ,"MAG", 90
        ,"ATTACK", 50
        ,"DEFENCE", 25
        ,"ARMOR", 300
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_CAST_ATTACK_ALL:2][POISON_ATTACK:1]"
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_CAST_TOKEN:1]"
        ,"DROP_ITEM_LIST", @"MONEY,3000,1000,{ITEM_骨},1-2,500,{ITEM_銀インゴット},2-4,300,{ITEM_金鉱石},1-3,500"
        +"[RUNE:WPN_MAG_DEFENCE_UP][SKILL_LV:1],1-2,100,[RUNE:WPN_MAG_DEFENCE_UP][SKILL_LV:2],1,50,"
        ,"EXP", 6
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "幽鬼の騎兵"
        ,"MAX_HP", 5000
        ,"STR", 65
        ,"MAG", 15
        ,"ATTACK", 65
        ,"DEFENCE", 35
        ,"ARMOR", 300
        ,"AGILITY", 125
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_魔術師
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FATAL_ATTACK:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2000,1000,{ITEM_銀インゴット},2-4,500,"
        ,"EXP", 5
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "壊乱の狂鹿"
        ,"MAX_HP", 4200
        ,"STR", 80
        ,"MAG", 0
        ,"ATTACK", 80
        ,"DEFENCE", 30
        ,"ARMOR", 350
        ,"AGILITY", 115
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[STUN_ROAR:1][SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,4000,1000,{ITEM_銀インゴット},1-3,300,{ITEM_魔獣の心核},1-2,200,"
        ,"EXP", 5
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "レイスロード"
        ,"MAX_HP", 6500
        ,"STR", 75
        ,"MAG", 40
        ,"ATTACK", 75
        ,"DEFENCE", 30
        ,"ARMOR", 375
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_魔術師
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FATAL_ATTACK:2][WRAITHLORD_POISON:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_金インゴット},2-4,500,"
        ,"EXP", 7
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "おぞましき獣"
        ,"MAX_HP", 10000
        ,"STR", 160
        ,"MAG", 50
        ,"ATTACK", 160
        ,"DEFENCE", 40
        ,"ARMOR", 375
        ,"AGILITY", 200
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[SKILL_USE_RATE:25]"
        ,"ENEMY_ACTIVE_SKILL", "[STUN_ROAR:2][SMITE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,4000,1000,{ITEM_銀インゴット},1-3,300,{ITEM_魔獣の心核},1-2,200,"
        ,"EXP", 8
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "キマイラ・本体"
        ,"MAX_HP", 7000
        ,"STR", 75
        ,"MAG", 30
        ,"ATTACK", 75
        ,"DEFENCE", 30
        ,"ARMOR", 500
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低耐久
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,4000,1000,{ITEM_銀インゴット},1-3,750,{ITEM_金インゴット},1-3,450,"
        ,"EXP", 7
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "キマイラ・山羊の首"
        ,"MAX_HP", 4000
        ,"STR", 25
        ,"MAG", 75
        ,"ATTACK", 25
        ,"DEFENCE", 20
        ,"ARMOR", 300
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_魔術師
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FATAL_ATTACK:1][ACT_CAST_ATTACK_ALL:2]"
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_CAST_TOKEN:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_銀インゴット},1-3,450,"
        ,"EXP", 7
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "キマイラ・竜の首"
        ,"MAX_HP", 4000
        ,"STR", 80
        ,"MAG", 30
        ,"ATTACK", 80
        ,"DEFENCE", 20
        ,"ARMOR", 300
        ,"AGILITY", 50
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_高脅威
        ,"ENEMY_ACTIVE_SKILL", "[ACT_FIRE_BREATH:3]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_金インゴット},1-3,450,"
        ,"EXP", 7
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "使い魔・低級"
        ,"MAX_HP", 1000
        ,"STR", 20
        ,"MAG", 0
        ,"ATTACK", 20
        ,"DEFENCE", 10
        ,"ARMOR", 100
        ,"AGILITY", 75
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "傭兵"
        ,"MAX_HP", 2000
        ,"STR", 65
        ,"MAG", 0
        ,"ATTACK", 65
        ,"DEFENCE", 20
        ,"ARMOR", 200
        ,"AGILITY", 75
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[SMITE:1]"
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "リヴィエラ精鋭海兵"
        ,"MAX_HP", 3200
        ,"STR", 100
        ,"MAG", 0
        ,"ATTACK", 100
        ,"DEFENCE", 35
        ,"ARMOR", 250
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低耐久
        ,"ENEMY_ACTIVE_SKILL", "[WPN_HARDSHOT:3][ACT_FRONT_DEFENCE:1]"
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ドラゴンゾンビ"
        ,"MAX_HP", 18000
        ,"STR", 180
        ,"MAG", 0
        ,"ATTACK", 180
        ,"DEFENCE", 10
        ,"ARMOR", 300
        ,"AGILITY", 60
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[STUN_ROAR:2][SMITE:3]"
        ,"DROP_ITEM_LIST", @"MONEY,8000,1000,{ITEM_金インゴット},1-3,300,{ITEM_骨},3-9,1000,{ITEM_竜の牙},1-4,300,{ITEM_竜の肉},1-2,500,"
        +"{ITEM_魔獣の心核},1-2,200,"
        ,"EXP", 8
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ゴーレム"
        ,"MAX_HP", 6000
        ,"STR", 90
        ,"MAG", 0
        ,"ATTACK", 90
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 30
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_STUN_ENEMY:1][ACT_FRONT_DEFENCE:1][SMITE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,500,1000,{ITEM_鋼インゴット},2-5,300,{ITEM_銀鉱石},1-3,100,"
        ,"EXP", 8
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "地竜"
        ,"ENEMY_TYPE", ENEMY_TYPE_竜
        ,"MAX_HP", 20000
        ,"STR", 200
        ,"MAG", 30
        ,"ATTACK", 200
        ,"DEFENCE", 40
        ,"ARMOR", 400
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[SKILL_USE_RATE:35]"
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_POISON:2]"
        ,"ENEMY_ACTIVE_SKILL", "[STUN_ROAR:2][ENEMY_ACT_SAND_DIVE:5]"
        ,"DROP_ITEM_LIST", @"MONEY,8000,1000,{ITEM_金インゴット},1-3,300,{ITEM_骨},3-8,500,{ITEM_竜の牙},1-3,300,{ITEM_竜の肉},1-2,500,"
        ,"EXP", 10
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "地竜の仔"
        ,"ENEMY_TYPE", ENEMY_TYPE_竜
        ,"MAX_HP", 6500
        ,"STR", 110
        ,"MAG", 20
        ,"ATTACK", 110
        ,"DEFENCE", 25
        ,"ARMOR", 200
        ,"AGILITY", 110
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低耐久
        ,"ENEMY_PASSIVE_SKILL", "[ATK_ADD_POISON:2]"
        ,"ENEMY_ACTIVE_SKILL", "[ENEMY_ACT_SAND_DIVE:2]"
        ,"DROP_ITEM_LIST", @"MONEY,2000,1000,{ITEM_銀インゴット},1-3,300,{ITEM_骨},1-4,300,{ITEM_竜の牙},1-2,200,{ITEM_竜の肉},1,300,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "風乗りグレムリン"
        ,"ENEMY_TYPE", ENEMY_TYPE_魔族
        ,"MAX_HP", 8500
        ,"STR", 110
        ,"MAG", 55
        ,"ATTACK", 110
        ,"DEFENCE", 35
        ,"ARMOR", 300
        ,"AGILITY", 200
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低耐久
        ,"ENEMY_AI", "[SKILL_USE_RATE:40]"
        ,"ENEMY_ACTIVE_SKILL", "[EMEMY_WIND_DEFENCE:3][SMITE:2][ACT_TORN_CLOTH:1]"
        ,"DROP_ITEM_LIST", @"MONEY,4000,1000,{ITEM_銀インゴット},1-3,300,{ITEM_魔獣の心核},1,200,"
        ,"EXP", 8
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "レッサーサキュバス"
        ,"MAX_HP", 3200
        ,"STR", 30
        ,"MAG", 50
        ,"ATTACK", 30
        ,"DEFENCE", 25
        ,"ARMOR", 250
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[AI_FUNC:SEXUAL_ENEMY][SKILL_USE_RATE:30][SEX_ATTACK_USE_RATE:80]"
        ,"ENEMY_PASSIVE_SKILL", ""
        ,"ENEMY_ACTIVE_SKILL", "[ACT_TEMPTATION:1][ACT_MOLESTATION:1][ACT_MOLESTATION_MALE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_媚薬},1-2,25,{ITEM_ローション},2-4,25,{ITEM_サルマキス薬},1,5,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "レッサーインキュバス"
        ,"MAX_HP", 3200
        ,"STR", 60
        ,"MAG", 30
        ,"ATTACK", 60
        ,"DEFENCE", 30
        ,"ARMOR", 300
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[AI_FUNC:SEXUAL_ENEMY][SKILL_USE_RATE:30][SEX_ATTACK_USE_RATE:80]"
        ,"ENEMY_PASSIVE_SKILL", ""
        ,"ENEMY_ACTIVE_SKILL", "[ACT_TEMPTATION:1][ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,2500,1000,{ITEM_媚薬},1-2,25,{ITEM_ローション},2-4,25,{ITEM_サルマキス薬},1,5,"
        ,"EXP", 4
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "淫蟲"
        ,"ENEMY_TYPE", ENEMY_TYPE_蟲
        ,"MAX_HP", 2500
        ,"STR", 60
        ,"MAG", 0
        ,"ATTACK", 60
        ,"DEFENCE", 25
        ,"ARMOR", 125
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[AI_FUNC:SEXUAL_ENEMY][SKILL_OVERRIDE_FUNC:蟲類汎用][SKILL_USE_RATE:20][SEX_ATTACK_USE_RATE:50]"
        ,"ENEMY_PASSIVE_SKILL", ""
        ,"ENEMY_ACTIVE_SKILL", "[ACT_TEMPTATION:1][ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_魔獣の肉片},1-2,250,{ITEM_精液},4-6,350,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "ピンクスライム"
        ,"ENEMY_TYPE", ENEMY_TYPE_不定形
        ,"MAX_HP", 3200
        ,"STR", 40
        ,"MAG", 0
        ,"ATTACK", 40
        ,"DEFENCE", 30
        ,"ARMOR", 150
        ,"AGILITY", 40
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[AI_FUNC:SEXUAL_ENEMY][SKILL_OVERRIDE_FUNC:不定形汎用][SKILL_USE_RATE:20][SEX_ATTACK_USE_RATE:30]"
        ,"ENEMY_PASSIVE_SKILL", ""
        ,"ENEMY_ACTIVE_SKILL", "[POISON_ATTACK:1][ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_マナ触媒},1-2,250,{ITEM_岩塩},1-2,100,,{ITEM_動物性油},1-2,100,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "低級触手"
        ,"ENEMY_TYPE", ENEMY_TYPE_触手
        ,"MAX_HP", 3000
        ,"STR", 50
        ,"MAG", 0
        ,"ATTACK", 60
        ,"DEFENCE", 20
        ,"ARMOR", 180
        ,"AGILITY", 75
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_AI", "[AI_FUNC:SEXUAL_ENEMY][SKILL_OVERRIDE_FUNC:触手汎用][SKILL_USE_RATE:25][SEX_ATTACK_USE_RATE:80]"
        ,"ENEMY_PASSIVE_SKILL", ""
        ,"ENEMY_ACTIVE_SKILL", "[ACT_STUN_ENEMY:1][ACT_MOLESTATION:1]"
        ,"DROP_ITEM_LIST", @"MONEY,1000,1000,{ITEM_魔獣の肉片},1-2,250,{ITEM_魔獣の心核},1,5,"
        ,"EXP", 3
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "テストモブ"
        ,"MAX_HP", 999999
        ,"STR", 100
        ,"MAG", 0
        ,"ATTACK", 100
        ,"DEFENCE", 35
        ,"ARMOR", 50
        ,"AGILITY", 100
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", "[ACT_ENEMY_HEAL:1]"
        ,"DROP_ITEM_LIST", @"MONEY,100,1000,{ITEM_動物の肉},1,300,{ITEM_動物の革},1,300,{ITEM_鉄インゴット},1-2,100,"
        +"[RUNE:WPN_FRONT_DEFENCE][SKILL_LV:1],1,50,"
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "テストかかし"
        ,"MAX_HP", 9999999
        ,"STR", 0
        ,"MAG", 0
        ,"ATTACK", 0
        ,"DEFENCE", 0
        ,"ARMOR", 9999
        ,"AGILITY", 0
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
        ,"ENEMY_ACTIVE_SKILL", ""
        ,"DROP_ITEM_LIST", @""
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "テストメスガキ"
        ,"MAX_HP", 99999
        ,"STR", 0
        ,"MAG", 0
        ,"ATTACK", 0
        ,"DEFENCE", 60
        ,"ARMOR", 250
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_低脅威
        ,"ENEMY_AI", "[SKILL_USE_RATE:20][SEX_ATTACK_USE_RATE:90]"
        ,"ENEMY_ACTIVE_SKILL", "[ACT_TORN_CLOTH:1][ACT_MOLESTATION:1][ACT_MOLESTATION_MALE:1]"
        ,"DROP_ITEM_LIST", @"MONEY,750,1000,{ITEM_鉄インゴット},1-3,300,{ITEM_精液},1-5,200,{ITEM_媚薬},1-2,150,"
        ,"EXP", 2
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "『？？？』"
        ,"MAX_HP", 64000
        ,"STR", 400
        ,"MAG", 220
        ,"ATTACK", 400
        ,"DEFENCE", 75
        ,"ARMOR", 500
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "『？？？２』"
        ,"MAX_HP", 30000
        ,"STR", 400
        ,"MAG", 220
        ,"ATTACK", 400
        ,"DEFENCE", 75
        ,"ARMOR", 500
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
}
{
    DT_ROW_ADD "ENEMY_DATA"
        ,"ENEMY_DEF_NAME", "『？？？３』"
        ,"MAX_HP", 30000
        ,"STR", 400
        ,"MAG", 220
        ,"ATTACK", 400
        ,"DEFENCE", 75
        ,"ARMOR", 500
        ,"AGILITY", 120
        ,"HATE_RATE", 100
        ,"TARGETING", WPN_脅威選定_無作為
}


code:
;-------------------------------------------------
;;; XMLファイルからエネミーデータを読み込み、テーブルに追加
;-------------------------------------------------
@CC_ENEMY_DATA_FROM_XML
#DIMS DYNAMIC ITEMS, 2000
VARSET RESULTS

VARS ENEMY_DEF_NAME
VARS ENEMY_NAME
VARI ENEMY_TYPE
VARI MAX_HP
VARI STR
VARI MAG
VARI ATTACK
VARI DEFENCE
VARI ARMOR
VARI AGILITY
VARI HATE_RATE
VARI TARGETING
VARS LIST_DROP_ITEMS
VARS ITEM_NAME
VARS ITEM_NUM
VARS ITEM_RATE
VARI EXP_RATE
VARS DIC_ENEMY_ACTIVE_SKILL
VARS DIC_ENEMY_PASSIVE_SKILL
VARS DIC_ENEMY_AI
VARI SKILL_USE_RATE
VARI SEX_SKILL_USE_RATE
VARI ENEMY_NUM
VARI I
VARI J

XML_GET XMLID_ENEMY_DATA, @"//enemy_data", ITEMS, 3
ENEMY_NUM = RESULT

FOR I, 0, ENEMY_NUM
    XML_GET ITEMS:I, "//enemy_data/@ENEMY_DEF_NAME", RESULTS
    IF RESULT > 0
        ENEMY_DEF_NAME = %RESULTS%
    ELSE
        ;定義名が存在しないのはありえない
        CONTINUE
    ENDIF
    XML_GET ITEMS:I, "//enemy_data/@ENEMY_NAME", RESULTS
    IF RESULT > 0
        ENEMY_NAME = %RESULTS%
    ELSE
        ENEMY_NAME = %ENEMY_DEF_NAME%
    ENDIF
    XML_GET ITEMS:I, "//enemy_data/@ENEMY_TYPE", RESULTS
    IF RESULT > 0 && EXISTVAR(@"ENEMY_TYPE_%RESULTS%")
        ENEMY_TYPE = GETVAR(@"ENEMY_TYPE_%RESULTS%")
    ELSE
        ENEMY_TYPE = ENEMY_TYPE_未指定
    ENDIF
    XML_GET ITEMS:I, "//enemy_data/@MAX_HP", RESULTS
    MAX_HP = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@ATTACK", RESULTS
    ATTACK = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@MAG", RESULTS
    MAG = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@DEFENCE", RESULTS
    DEFENCE = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@ARMOR", RESULTS
    ARMOR = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@AGILITY", RESULTS
    AGILITY = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@HATE_RATE", RESULTS
    HATE_RATE = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@TARGETING", RESULTS
    IF RESULT > 0 && EXISTVAR(@"WPN_脅威選定_%RESULTS%")
        TARGETING = GETVAR(@"WPN_脅威選定_%RESULTS%")
    ELSE
        TARGETING = WPN_脅威選定_無作為
    ENDIF
    XML_GET ITEMS:I, "//enemy_data/@SKILL_USE_RATE", RESULTS
    SKILL_USE_RATE = RESULT > 0 ? TOINT(RESULTS) # 0
    XML_GET ITEMS:I, "//enemy_data/@SEX_SKILL_USE_RATE", RESULTS
    SEX_SKILL_USE_RATE = RESULT > 0 ? TOINT(RESULTS) # 0

    ;報酬の設定
    LIST_DROP_ITEMS '= ""
    XML_GET ITEMS:I, "//enemy_data/@REWARD_MONEY", RESULTS
    IF RESULT > 0
        LIST_DROP_ITEMS += @"MONEY,%RESULTS%,1000," ;金は確実に入手
    ENDIF
    FOR J, 0, 5
        XML_GET ITEMS:I, @"//enemy_data/@REWARD_ITEM_{J}", RESULTS
        IF RESULT > 0
            ITEM_NAME = %RESULTS%
            XML_GET ITEMS:I, @"//enemy_data/@REWARD_ITEM_{J}_COUNT", RESULTS
            IF RESULT > 0
                ITEM_NUM = %RESULTS%
            ELSE
                ITEM_NUM '= "0"
            ENDIF
            XML_GET ITEMS:I, @"//enemy_data/@REWARD_ITEM_{J}_RATE", RESULTS
            IF RESULT > 0
                ITEM_RATE = %RESULTS%
            ELSE
                ITEM_RATE '= "0"
            ENDIF
            LIST_DROP_ITEMS += @"%ITEM_NAME%,%ITEM_NUM%,%ITEM_RATE%,"
        ENDIF
    NEXT
    XML_GET ITEMS:I, "//enemy_data/@EXP", RESULTS
    EXP_RATE = RESULT > 0 ? TOINT(RESULTS) # 0

    ;エネミーAIの設定
    XML_GET ITEMS:I, "//enemy_data/@ENEMY_ACTIVE_SKILL", RESULTS
    DIC_ENEMY_ACTIVE_SKILL = %RESULT > 0 ? RESULTS # ""%
    XML_GET ITEMS:I, "//enemy_data/@ENEMY_PASSIVE_SKILL", RESULTS
    DIC_ENEMY_PASSIVE_SKILL = %RESULT > 0 ? RESULTS # ""%
    DIC_ENEMY_AI '= ""
    IF SKILL_USE_RATE > 0
        DIC_ENEMY_AI += @"[SKILL_USE_RATE:{SKILL_USE_RATE}]"
    ENDIF
    IF SEX_SKILL_USE_RATE > 0
        DIC_ENEMY_AI += @"[SEX_ATTACK_USE_RATE:{SEX_SKILL_USE_RATE}]"
    ENDIF
    XML_GET ITEMS:I, "//enemy_data/@ENEMY_AI", RESULTS
    IF RESULT > 0
        DIC_ENEMY_AI += @"%RESULTS%"
    ENDIF

    {
        DT_ROW_ADD "ENEMY_DATA"
            ,"ENEMY_DEF_NAME", ENEMY_DEF_NAME
            ,"ENEMY_NAME", ENEMY_NAME
            ,"ENEMY_TYPE", ENEMY_TYPE
            ,"MAX_HP", MAX_HP
            ,"STR", ATTACK
            ,"MAG", MAG
            ,"ATTACK", ATTACK
            ,"DEFENCE", DEFENCE
            ,"ARMOR", ARMOR
            ,"AGILITY", AGILITY
            ,"HATE_RATE", HATE_RATE
            ,"TARGETING", TARGETING
            ,"DROP_ITEM_LIST", LIST_DROP_ITEMS
            ,"ENEMY_AI", DIC_ENEMY_AI
            ,"ENEMY_ACTIVE_SKILL", DIC_ENEMY_ACTIVE_SKILL
            ,"ENEMY_PASSIVE_SKILL", DIC_ENEMY_PASSIVE_SKILL
            ,"EXP", EXP_RATE
    }

NEXT

RETURN 1

repo_name: napo/erafl

license: unknown


code:
;-------------------------------------------------
; エネミーや宝箱からドロップする装備のデータ
;-------------------------------------------------
@ADD_EQUIP_DATA
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_兎の尻尾"
        ,"WEAPON_NAME", "兎の尻尾"
        ,"WEAPON_ID", 4
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_その他
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_珊瑚の指輪"
        ,"WEAPON_NAME", "珊瑚の指輪"
        ,"WEAPON_ID", 4
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_その他
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_レギオンの大盾"
        ,"WEAPON_NAME", "レギオンの大盾"
        ,"WEAPON_ID", 5
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_鉄
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", "[WPN_FRONT_DEFENCE:1]"
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_ピルム"
        ,"WEAPON_NAME", "ピルム"
        ,"WEAPON_ID", 1
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_鋼
        ,"PASSIVE_WEAPON_SKILL", "[WPN_UPWARD_ARMOR_DECAY:1]"
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_真珠の首飾り"
        ,"WEAPON_NAME", "真珠の首飾り"
        ,"WEAPON_ID", 3
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_その他
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_羽飾り"
        ,"WEAPON_NAME", "羽飾り"
        ,"WEAPON_ID", 2
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_その他
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_ヘビーブーツ"
        ,"WEAPON_NAME", "ヘビーブーツ"
        ,"WEAPON_ID", 10
        ,"EQUIP_TYPE", 1
        ,"MATERIAL", WPN_材質_その他
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "WEAPON_コントラバス"
        ,"WEAPON_NAME", "コントラバス"
        ,"WEAPON_ID", 3
        ,"EQUIP_TYPE", 0
        ,"WEAPON_RANK", 5
        ,"MATERIAL", WPN_材質_鉄
        ,"PASSIVE_WEAPON_SKILL", "[WPN_ADD_SONG_AT_START:1]"
        ,"ACTIVE_WEAPON_SKILL", "[WPN_SMITE:3]"
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "WEAPON_ブラウン・ベス"
        ,"WEAPON_NAME", "ブラウン・ベス"
        ,"WEAPON_ID", 3
        ,"EQUIP_TYPE", 0
        ,"WEAPON_RANK", 3
        ,"MATERIAL", WPN_材質_鋼
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", "[WPN_HARDSHOT:2]"
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "WEAPON_人魚のトライデント"
        ,"WEAPON_NAME", "人魚のトライデント"
        ,"WEAPON_ID", 3
        ,"EQUIP_TYPE", 0
        ,"WEAPON_RANK", 5
        ,"MATERIAL", WPN_材質_銀
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", "[WPN_ADD_FRAGILE:2]"
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_人魚のハープ"
        ,"WEAPON_NAME", "人魚のハープ"
        ,"WEAPON_ID", 6
        ,"EQUIP_TYPE", 1
        ,"WEAPON_RANK", 3
        ,"MATERIAL", WPN_材質_銀
        ,"PASSIVE_WEAPON_SKILL", "[WPN_ADD_SONG_AT_START:1]"
        ,"ACTIVE_WEAPON_SKILL", ""
}
{
    DT_ROW_ADD "EQUIP_DATA"
        ,"WEAPON_DEF_NAME", "RELIC_赤べこ"
        ,"WEAPON_NAME", "赤べこ"
        ,"WEAPON_ID", 1
        ,"EQUIP_TYPE", 1
        ,"WEAPON_RANK", 0
        ,"MATERIAL", WPN_材質_木
        ,"PASSIVE_WEAPON_SKILL", ""
        ,"ACTIVE_WEAPON_SKILL", ""
}


code:
@CC_MODIFIER_MAP_INIT()
#DIMS CONST MAP_NAME = "CC_MODIFIER"
IF !MAP_EXIST(MAP_NAME)
    MAP_CREATE MAP_NAME
ELSE
    MAP_CLEAR MAP_NAME
ENDIF

@CC_MODIFIER_MAP_ADD(KEY, VALUE)
#DIMS KEY
#DIM  VALUE
#DIMS CONST MAP_NAME = "CC_MODIFIER"

MAP_SET MAP_NAME, KEY, TOSTR(VALUE + TOINT(MAP_GET(MAP_NAME, KEY)))

@CC_MODIFIER_MAP_GET(KEY)
#FUNCTION
#DIMS KEY
#DIM  VALUE
#DIMS CONST MAP_NAME = "CC_MODIFIER"

RETURNF TOINT(MAP_GET(MAP_NAME,KEY))

;-------------------------------------------------
;;; CC_DAMAGE用合算
;-------------------------------------------------
@CC_CALC_MODIFIER_CC_DAMAGE(ATTACKER_DID, DEFENDER_DID)
#DIM ATTACKER_DID
#DIM DEFENDER_DID

CALL CC_PASSIVE_SKILL_CALC_MODIFIER("CC_DAMAGE_ATTACKER", ATTACKER_DID, DEFENDER_DID)
CALL CC_PASSIVE_SKILL_CALC_MODIFIER("CC_DAMAGE_DEFENDER", DEFENDER_DID, ATTACKER_DID)

DEBUGPRINTFORML %MAP_TOXML("CC_MODIFIER")%

CALL CC_SP_TOKEN_CALC_MODIFIER("CC_DAMAGE_ATTACKER", ATTACKER_DID, DEFENDER_DID)
CALL CC_SP_TOKEN_CALC_MODIFIER("CC_DAMAGE_DEFENDER", DEFENDER_DID, ATTACKER_DID)

DEBUGPRINTFORML %MAP_TOXML("CC_MODIFIER")%

;-------------------------------------------------
;;; トークン補正値合算処理
;-------------------------------------------------
@CC_SP_TOKEN_CALC_MODIFIER(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID = -1)
#DIMS MODIFIED_AT
#DIM ACTOR_DID
#DIM OPPORNENT_DID

#DIMS DYNAMIC PARENT_TOKEN_NAMES, SP_TOKEN_MAX_TYPE
#DIM  DYNAMIC TOKEN_TYPE_NUM
#DIM  DYNAMIC TOKEN_NUM
#DIMS DYNAMIC PARENT_TOKEN_NAME
#DIM DYNAMIC MODIFIER_COUNT
#DIM DYNAMIC MODIFIER_DID, SP_TOKEN_MAX_MODIFIER
#DIMS DYNAMIC FUNC_NAME
#DIM DYNAMIC MODIFY_CHANCE
#DIMS DYNAMIC MODIFY_CONDITION
#DIM DYNAMIC ITER_I
#DIM DYNAMIC ITER_J
#DIMS DYNAMIC CATEGORY

TOKEN_TYPE_NUM = DT_COLUMN_NAMES("CC_SP_TOKEN_NUM")
ARRAYCOPY "RESULTS", "PARENT_TOKEN_NAMES"
;DEBUGPRINTFORML ------------------------------------------------------------
;DEBUGPRINTFORML @CC_SP_TOKEN_CALC_MODIFIER CATEGORY %CATEGORY% MODIFIED_AT = %MODIFIED_AT% %DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "CHARA_NAME", 1)%
FOR ITER_I, 1, TOKEN_TYPE_NUM
    PARENT_TOKEN_NAME = %PARENT_TOKEN_NAMES:ITER_I%

    TOKEN_NUM = CC_SP_TOKEN_NUM(ACTOR_DID, PARENT_TOKEN_NAME)
    SIF TOKEN_NUM == 0
        CONTINUE
    ;DEBUGPRINTFORML %PARENT_TOKEN_NAME% = {CC_SP_TOKEN_NUM(ACTOR_DID, PARENT_TOKEN_NAME)}個
    MODIFIER_COUNT = DT_SELECT("SP_TOKEN_MODIFIER_PARAMS", @"PARENT_TOKEN_NAME = '%PARENT_TOKEN_NAME%' AND MODIFIED_AT = '%MODIFIED_AT%'",,MODIFIER_DID)
    SIF MODIFIER_COUNT == 0
        CONTINUE
    ;DEBUGPRINTFORML %PARENT_TOKEN_NAME% MODIFIER_COUNT {MODIFIER_COUNT}
    FOR ITER_J, 0, MODIFIER_COUNT
        ;確率発動条件
        MODIFY_CHANCE = CC_GET_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID:ITER_J, "MODIFY_CHANCE")
        ;DEBUGPRINTFORML MODIFY_CHANCE {MODIFY_CHANCE}
        SIF MODIFY_CHANCE != 100 && !PERCENT(MODIFY_CHANCE)
            CONTINUE
        ;発動条件
        MODIFY_CONDITION = %CC_GETS_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID:ITER_J,"MODIFY_CONDITION")%
        ;DEBUGPRINTFORML MODIFY_CONDITION = %MODIFY_CONDITION%
        SIF MODIFY_CONDITION != "" && !TOINT(STRFORM(MODIFY_CONDITION))
            CONTINUE

        FUNC_NAME = %DT_CELL_GETS("SP_TOKEN_MODIFIER_PARAMS", MODIFIER_DID:ITER_J, "FUNC_NAME", 1)%
        CATEGORY = %DT_CELL_GETS("SP_TOKEN_MODIFIER_PARAMS", MODIFIER_DID:ITER_J, "CATEGORY", 1)%
        ;DEBUGPRINTFORML %FUNC_NAME%
        TRYCALLFORMF CC_SP_TOKEN_MODIFIER_%FUNC_NAME%(ACTOR_DID, OPPORNENT_DID, MODIFIER_DID:ITER_J, PARENT_TOKEN_NAME, TOKEN_NUM)
        ;DEBUGPRINTFORML %PARENT_TOKEN_NAME% %MODIFIED_AT% %CATEGORY% {CC_MODIFIER_MAP_GET(CATEGORY)} += {RESULT}
        CALL CC_MODIFIER_MAP_ADD(CATEGORY, RESULT)
    NEXT
NEXT

;DEBUGPRINTFORML ------------------------------------------------------------

;-------------------------------------------------
;;; パッシブスキル補正値合算処理
;-------------------------------------------------
@CC_PASSIVE_SKILL_CALC_MODIFIER(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID = -1)
#DIMS MODIFIED_AT
#DIM ACTOR_DID
#DIM OPPORNENT_DID

;スキル情報
#DIM  DYNAMIC ACTOR_CHARA_ID
#DIM  DYNAMIC WPN_IDX, 3
#DIM  DYNAMIC WPN_NUM
#DIM  DYNAMIC TOTAL_MODIFIER

IF DT_CELL_GET("CC_ACTOR", ACTOR_DID, "IS_PLAYABLE", 1)
    ACTOR_CHARA_ID = DT_CELL_GET("CC_ACTOR", ACTOR_DID, "CHARA_ID", 1)
    ;パッシブスキル
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_SKILL_LIST:ACTOR_CHARA_ID:スキル_大分類_冒険, XMLID_SKILL_BATTLE, ACTOR_CHARA_ID)
    ;武器パッシブ
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "WPN_PASSIVE_SKILLS", 1), XMLID_WPN_SKILL_PASSIVE, ACTOR_CHARA_ID)
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "RELIC_1_PASSIVE_SKILLS", 1), XMLID_WPN_SKILL_PASSIVE, ACTOR_CHARA_ID)
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "RELIC_2_PASSIVE_SKILLS", 1), XMLID_WPN_SKILL_PASSIVE, ACTOR_CHARA_ID)
    ;性技
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_SKILL_LIST:ACTOR_CHARA_ID:スキル_大分類_性技, XMLID_SKILL_LEWD, ACTOR_CHARA_ID)
ELSE
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "ENEMY_PASSIVE_SKILL", 1), XMLID_SKILL_BATTLE, ACTOR_CHARA_ID)
ENDIF

;-------------------------------------------------
;;; パッシブスキル補正値合算処理
;;; 戦闘前などのACTOR_DID付与前を想定
;-------------------------------------------------
@CC_PASSIVE_SKILL_CALC_MODIFIER_BY_CHARA_ID(MODIFIED_AT, ACTOR_CHARA_ID)
#DIMS MODIFIED_AT
#DIM ACTOR_DID = -1
#DIM OPPORNENT_DID = -1

;スキル情報
#DIM  DYNAMIC ACTOR_CHARA_ID
#DIMS DYNAMIC WPN_PASSIVE_SKILLS, VARSIZE("WPN_EQUIP_SLOT_ID_LIST")
CALL CC_INTEGRATE_WPN_PASSIVE_SKILL(ACTOR_CHARA_ID, WPN_PASSIVE_SKILLS)

;パッシブスキル
CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_SKILL_LIST:ACTOR_CHARA_ID:スキル_大分類_冒険, XMLID_SKILL_BATTLE, ACTOR_CHARA_ID)
;武器パッシブ
FOR LOCAL, 0, VARSIZE("WPN_PASSIVE_SKILLS")
    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, WPN_PASSIVE_SKILLS:LOCAL, XMLID_WPN_SKILL_PASSIVE, ACTOR_CHARA_ID)
NEXT
;性技
CALL CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_SKILL_LIST:ACTOR_CHARA_ID:スキル_大分類_性技, XMLID_SKILL_LEWD, ACTOR_CHARA_ID)

;DEBUGPRINTFORML %MAP_TOXML("CC_MODIFIER")%

@CC_PASSIVE_SKILL_CALC_MODIFIER_MAIN(MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_ACTOR_SKILL, XMLID, ACTOR_CHARA_ID)
#DIMS MODIFIED_AT
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _DIC_ACTOR_SKILL
#DIM  XMLID
#DIM  ACTOR_CHARA_ID

;スキル情報
#DIM  DYNAMIC MODIFIER_NUM
#DIMS DYNAMIC _XML_MODIFIER, MAX_MODIFIER_PER_SKILL
#DIMS DYNAMIC ACTOR_SKILL_DEF_LIST, VARSIZE("SKILL_DEF_LIST")
#DIM  DYNAMIC SKILL_COUNT
#DIM  DYNAMIC ITER_I
#DIM  DYNAMIC ITER_J
#DIM  DYNAMIC XML_RESULT
#DIMS DYNAMIC XML_RESULTS

#DIMS DYNAMIC CATEGORY
#DIM  DYNAMIC SKILL_LEVEL
SKILL_COUNT = DIC_KEYSF(_DIC_ACTOR_SKILL)
ARRAYCOPY "RESULTS", "ACTOR_SKILL_DEF_LIST"
DEBUGPRINTFORML SKILL_COUNT = {SKILL_COUNT}
;DEBUGPRINTFORML ------------------------------------------------------------
;DEBUGPRINTFORML @CC_SKILL_CALC_MODIFIER EXECUTE_AT_%CATEGORY% MODIFIED_AT = %MODIFIED_AT% %DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "CHARA_NAME", 1)%
;DEBUGPRINTFORML _DIC_ACTOR_SKILL %_DIC_ACTOR_SKILL%

FOR ITER_I, 0, SKILL_COUNT
    VARSET _XML_MODIFIER
    MODIFIER_NUM = XML_GET(XMLID, @"//defname[@parentname='%ACTOR_SKILL_DEF_LIST:ITER_I%']/modifier[@modifiedAt ='%MODIFIED_AT%']", _XML_MODIFIER, 3)
    SIF MODIFIER_NUM == 0
        CONTINUE
    DEBUGPRINTFORML %ACTOR_SKILL_DEF_LIST:ITER_I% MODIFIER_NUM = {MODIFIER_NUM} _XML_MODIFIER = %_XML_MODIFIER%

    ;あかん
    SKILL_LEVEL = DIC_GETINT(_DIC_ACTOR_SKILL, ACTOR_SKILL_DEF_LIST:ITER_I)

    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_SUB(_XML_MODIFIER, MODIFIER_NUM, SKILL_LEVEL, ACTOR_CHARA_ID, ACTOR_DID, OPPORNENT_DID)
NEXT
;DEBUGPRINTFORML ------------------------------------------------------------
; #endregion

@CC_PASSIVE_SKILL_CALC_MODIFIER_SUB(_XML_MODIFIER, MODIFIER_NUM, SKILL_LEVEL, ACTOR_CHARA_ID, ACTOR_DID = -1, OPPORNENT_DID = -1)
#DIMS REF _XML_MODIFIER, 0
#DIM  MODIFIER_NUM
#DIM  SKILL_LEVEL
#DIM  ACTOR_CHARA_ID
#DIM  ACTOR_DID
#DIM  OPPORNENT_DID

#DIM  DYNAMIC ITER_J
#DIM  DYNAMIC XML_RESULT
#DIMS DYNAMIC XML_RESULTS

#DIMS DYNAMIC CATEGORY

FOR ITER_J, 0, MODIFIER_NUM
    XML_GET _XML_MODIFIER:ITER_J, @"//modifyChance/li[{SKILL_LEVEL}]", XML_RESULTS, 1
    SIF RESULT && !PERCENT(TOINT(XML_RESULTS))
        CONTINUE
    XML_GET _XML_MODIFIER:ITER_J, @"//modifyCondition", XML_RESULTS, 1
    XML_RESULT = RESULT
    ;SIF XML_RESULT
        ;DEBUGPRINTFORML modifyCondition %XML_RESULTS% = {TOINT(STRFORM(XML_RESULTS))}
    SIF XML_RESULT && !TOINT(STRFORM(XML_RESULTS))
        CONTINUE
    XML_GET _XML_MODIFIER:ITER_J, "//@category", CATEGORY, 1
    ;DEBUGPRINTFORML CATEGORY %CATEGORY%
    XML_GET _XML_MODIFIER:ITER_J, "//modifierFunction", XML_RESULTS, 1
    ;DEBUGPRINTFORML EXEC CC_PASSIVE_SKILL_MODIFIER_%XML_RESULTS%
    RESULT = 0
    TRYCALLFORMF CC_PASSIVE_SKILL_MODIFIER_%XML_RESULTS%(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER:ITER_J, SKILL_LEVEL, ACTOR_CHARA_ID)
    DEBUGPRINTFORML %CATEGORY% {CC_MODIFIER_MAP_GET(CATEGORY)} += {RESULT}
    CALL CC_MODIFIER_MAP_ADD(CATEGORY, RESULT)
NEXT

;素質
;補正用関数は通常パッシブスキルと共用する
@CC_TALENT_CALC_MODIFIER_BY_CHARA_ID(MODIFIED_AT, ACTOR_CHARA_ID)
#DIMS MODIFIED_AT
#DIM  ACTOR_CHARA_ID

;スキル情報
#DIMS DYNAMIC _XML_MODIFIER, MAX_MODIFIER_PER_SKILL
#DIM  DYNAMIC ITER_I
#DIM  CONST SKILL_LEVEL = 1 ;固定
#DIM  TALENT_NUM
#DIM  MODIFIER_NUM

TALENT_NUM = VARSIZE("TALENT")

FOR ITER_I, 0, TALENT_NUM
    SIF TALENT:ACTOR_CHARA_ID:ITER_I == 0
        CONTINUE
    MODIFIER_NUM = XML_GET(XMLID_TALENT, @"//defname[@id='%TOSTR(ITER_I)%']/modifier[@modifiedAt ='%MODIFIED_AT%']", _XML_MODIFIER, 3)
    SIF MODIFIER_NUM == 0
        CONTINUE

    CALL CC_PASSIVE_SKILL_CALC_MODIFIER_SUB(_XML_MODIFIER, MODIFIER_NUM, SKILL_LEVEL, ACTOR_CHARA_ID)
NEXT

;-------------------------------------------------
;;; トークン補正値合算処理(個別)
;-------------------------------------------------
@CC_SP_TOKEN_CALC_MODIFIER_SPECIFIC(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID)
#FUNCTION
#DIMS CATEGORY
#DIMS MODIFIED_AT
#DIM ACTOR_DID
#DIM OPPORNENT_DID

#DIM DYNAMIC TOTAL_MODIFIER
#DIMS DYNAMIC PARENT_TOKEN_NAMES, SP_TOKEN_MAX_TYPE
#DIM  DYNAMIC TOKEN_TYPE_NUM
#DIM  DYNAMIC TOKEN_NUM
#DIMS DYNAMIC PARENT_TOKEN_NAME
#DIM DYNAMIC MODIFIER_COUNT
#DIM DYNAMIC MODIFIER_DID, SP_TOKEN_MAX_MODIFIER
#DIMS DYNAMIC FUNC_NAME
#DIM DYNAMIC MODIFY_CHANCE
#DIMS DYNAMIC MODIFY_CONDITION
#DIM DYNAMIC ITER_I
#DIM DYNAMIC ITER_J

TOKEN_TYPE_NUM = DT_COLUMN_NAMES("CC_SP_TOKEN_NUM")
ARRAYCOPY "RESULTS", "PARENT_TOKEN_NAMES"
DEBUGPRINTFORML ------------------------------------------------------------
DEBUGPRINTFORML @CC_SP_TOKEN_CALC_MODIFIER EXECUTE_AT_%CATEGORY% MODIFIED_AT = %MODIFIED_AT% %DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "CHARA_NAME", 1)%
FOR ITER_I, 1, TOKEN_TYPE_NUM
    PARENT_TOKEN_NAME = %PARENT_TOKEN_NAMES:ITER_I%

    TOKEN_NUM = CC_SP_TOKEN_NUM(ACTOR_DID, PARENT_TOKEN_NAME)
    SIF TOKEN_NUM == 0
        CONTINUE
    DEBUGPRINTFORML %PARENT_TOKEN_NAME% = {CC_SP_TOKEN_NUM(ACTOR_DID, PARENT_TOKEN_NAME)}個
    MODIFIER_COUNT = DT_SELECT("SP_TOKEN_MODIFIER_PARAMS", @"PARENT_TOKEN_NAME = '%PARENT_TOKEN_NAME%' AND CATEGORY = '%CATEGORY%' AND MODIFIED_AT = '%MODIFIED_AT%'",,MODIFIER_DID)
    SIF MODIFIER_COUNT == 0
        CONTINUE
    DEBUGPRINTFORML %PARENT_TOKEN_NAME% MODIFIER_COUNT {MODIFIER_COUNT}
    FOR ITER_J, 0, MODIFIER_COUNT
        ;確率発動条件
        MODIFY_CHANCE = CC_GET_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID:ITER_J, "MODIFY_CHANCE")
        DEBUGPRINTFORML MODIFY_CHANCE {MODIFY_CHANCE}
        SIF MODIFY_CHANCE != 100 && !PERCENT(MODIFY_CHANCE)
            CONTINUE
        ;発動条件
        MODIFY_CONDITION = %CC_GETS_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID:ITER_J,"MODIFY_CONDITION")%
        DEBUGPRINTFORML MODIFY_CONDITION = %MODIFY_CONDITION%
        SIF MODIFY_CONDITION != "" && !TOINT(STRFORM(MODIFY_CONDITION))
            CONTINUE

        FUNC_NAME = %DT_CELL_GETS("SP_TOKEN_MODIFIER_PARAMS", MODIFIER_DID:ITER_J, "FUNC_NAME", 1)%
        DEBUGPRINTFORML %FUNC_NAME%
        TRYCALLFORMF CC_SP_TOKEN_MODIFIER_%FUNC_NAME%(ACTOR_DID, OPPORNENT_DID, MODIFIER_DID:ITER_J, PARENT_TOKEN_NAME, TOKEN_NUM)
        TOTAL_MODIFIER += RESULT
    NEXT
NEXT
DEBUGPRINTFORML TOTAL_MODIFIER = {TOTAL_MODIFIER}
DEBUGPRINTFORML ------------------------------------------------------------
RETURNF TOTAL_MODIFIER

;-------------------------------------------------
;;; スキル補正値合算処理（個別）
;-------------------------------------------------
@CC_PASSIVE_SKILL_CALC_MODIFIER_SPECIFIC(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID)
#FUNCTION
#DIMS CATEGORY
#DIMS MODIFIED_AT
#DIM  ACTOR_DID
#DIM  OPPORNENT_DID
#DIM  DYNAMIC ACTOR_CHARA_ID
#DIM  DYNAMIC TOTAL_MODIFIER

IF DT_CELL_GET("CC_ACTOR", ACTOR_DID, "IS_PLAYABLE", 1)
    ACTOR_CHARA_ID = DT_CELL_GET("CC_ACTOR", ACTOR_DID, "CHARA_ID", 1)
    ;パッシブスキル
    TOTAL_MODIFIER += CC_PASSIVE_SKILL_CALC_MODIFIER_SPECIFIC_SUB(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_SKILL_LIST:ACTOR_CHARA_ID:スキル_大分類_冒険, XMLID_SKILL_BATTLE, ACTOR_CHARA_ID)
    ;武器パッシブ
    TOTAL_MODIFIER += CC_PASSIVE_SKILL_CALC_MODIFIER_SPECIFIC_SUB(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "INTEGRATED_WPN_PASSIVE_SKILLS", 1), XMLID_WPN_SKILL_PASSIVE, ACTOR_CHARA_ID)
    ;性技
    TOTAL_MODIFIER += CC_PASSIVE_SKILL_CALC_MODIFIER_SPECIFIC_SUB(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_SKILL_LIST:ACTOR_CHARA_ID:スキル_大分類_性技, XMLID_SKILL_LEWD, ACTOR_CHARA_ID)
ELSE
    TOTAL_MODIFIER += CC_PASSIVE_SKILL_CALC_MODIFIER_SPECIFIC_SUB(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "ENEMY_PASSIVE_SKILL", 1), XMLID_SKILL_BATTLE, ACTOR_CHARA_ID)
ENDIF

RETURNF TOTAL_MODIFIER

@CC_PASSIVE_SKILL_CALC_MODIFIER_SPECIFIC_SUB(CATEGORY, MODIFIED_AT, ACTOR_DID, OPPORNENT_DID, _DIC_ACTOR_SKILL, XMLID, ACTOR_CHARA_ID)
#FUNCTION
#DIMS CATEGORY
#DIMS MODIFIED_AT
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _DIC_ACTOR_SKILL
#DIM  XMLID
#DIM  ACTOR_CHARA_ID

;スキル情報
#DIM  DYNAMIC MODIFIER_NUM
#DIMS DYNAMIC _XML_MODIFIER, MAX_MODIFIER_PER_SKILL
#DIMS DYNAMIC ACTOR_SKILL_DEF_LIST, VARSIZE("SKILL_DEF_LIST")
#DIM  DYNAMIC SKILL_COUNT
#DIM  DYNAMIC ITER_I
#DIM  DYNAMIC ITER_J
#DIM  DYNAMIC XML_RESULT
#DIMS DYNAMIC XML_RESULTS
#DIM  DYNAMIC TOTAL_MODIFIER
#DIM  DYNAMIC SKILL_LEVEL
SKILL_COUNT = DIC_KEYSF(_DIC_ACTOR_SKILL)
ARRAYCOPY "RESULTS", "ACTOR_SKILL_DEF_LIST"

DEBUGPRINTFORML ------------------------------------------------------------
DEBUGPRINTFORML @CC_SKILL_CALC_MODIFIER EXECUTE_AT_%CATEGORY% MODIFIED_AT = %MODIFIED_AT% %DT_CELL_GETS("CC_ACTOR", ACTOR_DID, "CHARA_NAME", 1)%
DEBUGPRINTFORML _DIC_ACTOR_SKILL %_DIC_ACTOR_SKILL%

FOR ITER_I, 0, SKILL_COUNT
    _XML_MODIFIER '= ""
    RESULT = 0
    MODIFIER_NUM = XML_GET(XMLID, @"//defname[@parentname='%ACTOR_SKILL_DEF_LIST:ITER_I%']/modifier[@category='%CATEGORY%' and @modifiedAt ='%MODIFIED_AT%']", _XML_MODIFIER, 3)
    SIF MODIFIER_NUM == 0
        CONTINUE
    DEBUGPRINTFORML %ACTOR_SKILL_DEF_LIST:ITER_I% MODIFIER_NUM = {MODIFIER_NUM} _XML_MODIFIER = %_XML_MODIFIER%
    SKILL_LEVEL = DIC_GETINT(_DIC_ACTOR_SKILL, ACTOR_SKILL_DEF_LIST:ITER_I)
    FOR ITER_J, 0, MODIFIER_NUM
        XML_GET _XML_MODIFIER:ITER_J, @"//modifyChance/li[{SKILL_LEVEL}]", XML_RESULTS, 1
        SIF RESULT && !PERCENT(TOINT(XML_RESULTS))
            CONTINUE
        XML_GET _XML_MODIFIER:ITER_J, @"//modifyCondition", XML_RESULTS, 1
        XML_RESULT = RESULT
        SIF XML_RESULT
            DEBUGPRINTFORML modifyCondition %XML_RESULTS% = {TOINT(STRFORM(XML_RESULTS))}
        SIF XML_RESULT && !TOINT(STRFORM(XML_RESULTS))
            CONTINUE
        XML_GET _XML_MODIFIER:ITER_J, "//modifierFunction", XML_RESULTS, 1
        DEBUGPRINTFORML EXEC CC_PASSIVE_SKILL_MODIFIER_%XML_RESULTS%
        TRYCALLFORMF CC_PASSIVE_SKILL_MODIFIER_%XML_RESULTS%(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER:ITER_J, SKILL_LEVEL, ACTOR_CHARA_ID)
        TOTAL_MODIFIER += RESULT
    NEXT
NEXT
DEBUGPRINTFORML TOTAL_MODIFIER = {TOTAL_MODIFIER}

DEBUGPRINTFORML ------------------------------------------------------------
RETURNF TOTAL_MODIFIER
; #endregion


code:
;-------------------------------------------------
;;; 補正値のXMLから値を取得
;-------------------------------------------------
@CC_SKILL_MODIFIER_GETS_LABELED_VALUE(_XML_MODIFIER, LABEL, SKILL_LEVEL = 1)
#FUNCTIONS
#DIMS _XML_MODIFIER
#DIMS LABEL
#DIM  SKILL_LEVEL

SIF XML_GET(_XML_MODIFIER, @"//value[@label = '%LABEL%']/li[{SKILL_LEVEL}]", RESULTS, 1) == 0
    THROW @CC_SKILL_MODIFIER_GET_LABELED_VALUE LABEL%LABEL%とSKILL_LEVEL{SKILL_LEVEL}に該当する値がありません　_XML_MODIFIER = %_XML_MODIFIER%
;DEBUGPRINTFORML @CC_SKILL_MODIFIER_GET_LABELED_VALUE LABEL = %LABEL% SKILL_LEVEL = {SKILL_LEVEL} RESULTS = %RESULTS%
RETURNF RESULTS

@CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, LABEL, SKILL_LEVEL = 1)
#FUNCTION
#DIMS _XML_MODIFIER
#DIMS LABEL
#DIM  SKILL_LEVEL

RETURNF TOINT(CC_SKILL_MODIFIER_GETS_LABELED_VALUE(_XML_MODIFIER, LABEL, SKILL_LEVEL))
;-------------------------------------------------
;;; 共通
;-------------------------------------------------
;-------------------------------------------------
;;; rateを足す
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_COMMON_ADD(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

RESULT:0 = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "RATE", SKILL_LEVEL)
RETURNF RESULT:0
;-------------------------------------------------
;;; rateを引く
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_COMMON_SUB(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

RESULT:0 = -1 * CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "RATE", SKILL_LEVEL)
RETURNF RESULT:0
;-------------------------------------------------
;;; 専用
;-------------------------------------------------
;-------------------------------------------------
;;; キャストオフ
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_CAST_OFF(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM EFFECT_RATE

EFFECT_RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "RATE", SKILL_LEVEL)
;DEBUGPRINTFORML @CC_PASSIVE_SKILL_MODIFIER_CAST_OFF _XML_MODIFIER %_XML_MODIFIER%
;DEBUGPRINTFORML EFFECT_RATE {EFFECT_RATE}

RESULT:0 = 0
SIF CC_SP_TOKEN_NUM(ACTOR_DID, "CHEST_EXPOSE") > 0
    RESULT:0 += EFFECT_RATE
SIF CC_SP_TOKEN_NUM(ACTOR_DID, "GENITAL_EXPOSE") > 0
    RESULT:0 += EFFECT_RATE
RETURNF RESULT:0
;-------------------------------------------------
;;; 背水
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_PSV_DEADLY_ATTACK(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM EFFECT_RATE
#DIM HP
#DIM BASE_HP
#DIM THRESHOLD

HP = DT_CELL_GET("CC_ACTOR", ACTOR_DID, "HP", 1)
THRESHOLD = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "THRESHOLD", SKILL_LEVEL)

BASE_HP = FTIMES(DT_CELL_GET("CC_ACTOR", ACTOR_DID, "MAX_HP", 1), THRESHOLD)
IF HP >= BASE_HP
    RESULT:0 = 0
    RETURNF RESULT:0
ENDIF

EFFECT_RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "RATE", SKILL_LEVEL)

RESULT:0 = FTIMES(EFFECT_RATE, (100 * (BASE_HP - HP)) / BASE_HP)
;DEBUGPRINTFORML @CC_PASSIVE_SKILL_MODIFIER_DEADLY_ATTACK RESULT:0 = {RESULT:0}
RETURNF RESULT:0

;-------------------------------------------------
;;; - ABLに応じた補正
;;;   - ABL: 変換元能力
;;;   - CONVERSION_RATE: 変換率(%)
;;;   - MIN: 変換後最小値
;;;   - MAX: 変換後最大値
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_ABL_CONVERT(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM CONVERSION_RATE
#DIMS ABL_NAME
#DIM DYNAMIC MAX_PARAM
#DIM DYNAMIC MIN_PARAM

ABL_NAME  = %CC_SKILL_MODIFIER_GETS_LABELED_VALUE(_XML_MODIFIER, "ABL")%
MIN_PARAM = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MIN")
MAX_PARAM = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MAX")
CONVERSION_RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "CONVERSION_RATE", SKILL_LEVEL)

RESULT:0 = LIMIT(FTIMES(ABL:ACTOR_CHARA_ID:GETNUM(ABL, ABL_NAME), CONVERSION_RATE), MIN_PARAM, MAX_PARAM)
RETURNF RESULT:0

;-------------------------------------------------
;;; - BASEに応じた補正
;;;   - BASE: 変換元能力
;;;   - CONVERSION_RATE: 変換率(%)
;;;   - MIN: 変換後最小値
;;;   - MAX: 変換後最大値
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_BASE_CONVERT(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM CONVERSION_RATE
#DIMS BASE_NAME
#DIM DYNAMIC MAX_PARAM
#DIM DYNAMIC MIN_PARAM

BASE_NAME  = %CC_SKILL_MODIFIER_GETS_LABELED_VALUE(_XML_MODIFIER, "BASE")%
MIN_PARAM = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MIN")
MAX_PARAM = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MAX")
CONVERSION_RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "CONVERSION_RATE", SKILL_LEVEL)

RESULT:0 = LIMIT(FTIMES(BASE:ACTOR_CHARA_ID:GETNUM(BASE, BASE_NAME), CONVERSION_RATE), MIN_PARAM, MAX_PARAM)
RETURNF RESULT:0

;-------------------------------------------------
;;; - MAXBASEに応じた補正
;;;   - MAXBASE: 変換元能力
;;;   - CONVERSION_RATE: 変換率(%)
;;;   - MIN: 変換後最小値
;;;   - MAX: 変換後最大値
;-------------------------------------------------
@CC_PASSIVE_SKILL_MODIFIER_MAXBASE_CONVERT(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM CONVERSION_RATE
#DIMS MAXBASE_NAME
#DIM DYNAMIC MAX_PARAM
#DIM DYNAMIC MIN_PARAM

MAXBASE_NAME  = %CC_SKILL_MODIFIER_GETS_LABELED_VALUE(_XML_MODIFIER, "MAXBASE")%
MIN_PARAM = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MIN")
MAX_PARAM = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MAX")
CONVERSION_RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "CONVERSION_RATE", SKILL_LEVEL)

RESULT:0 = LIMIT(FTIMES(MAXBASE:ACTOR_CHARA_ID:GETNUM(MAXBASE, MAXBASE_NAME), CONVERSION_RATE), MIN_PARAM, MAX_PARAM)
RETURNF RESULT:0


code:
@CC_PASSIVE_SKILL_MODIFIER_K26_DRAGONSCALE(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM RATE

RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "RATE", SKILL_LEVEL)
RESULT:0 = RATE * SQRT(CC_SP_TOKEN_NUM(ACTOR_DID, "DRAGONIC_EFFECT"))
;DEBUGPRINTFORML @CC_PASSIVE_SKILL_MODIFIER_K26_DRAGONSCALE
;DEBUGPRINTFORML {RATE} * SQRT{CC_SP_TOKEN_NUM(ACTOR_DID, "DRAGONIC_EFFECT")} = RESULT:0
RETURNF RESULT:0


code:
@CC_PASSIVE_SKILL_MODIFIER_K29_TOKEN_MULTI(ACTOR_DID, OPPORNENT_DID, _XML_MODIFIER, SKILL_LEVEL, ACTOR_CHARA_ID)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIMS _XML_MODIFIER
#DIM SKILL_LEVEL
#DIM ACTOR_CHARA_ID

#DIM MOD_RATE
#DIM MOD_MAX

MOD_RATE = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "RATE", SKILL_LEVEL)
MOD_MAX = CC_SKILL_MODIFIER_GET_LABELED_VALUE(_XML_MODIFIER, "MAX", SKILL_LEVEL)

RESULT:0 = MIN(MOD_MAX, MOD_RATE * CC_SP_TOKEN_NUM(ACTOR_DID, "CAST"))
;DEBUGPRINTFORML @CC_PASSIVE_SKILL_MODIFIER_K29_PRIDE
;DEBUGPRINTFORML {MOD_RATE} * {CC_SP_TOKEN_NUM(ACTOR_DID, "CAST")} = {RESULT:0} | MAX = {MOD_MAX}
RETURNF RESULT:0


code:
;-------------------------------------------------
;;; トークン補正関数-汎用
;-------------------------------------------------
;-------------------------------------------------
;;; rateを足す
;-------------------------------------------------
@CC_SP_TOKEN_MODIFIER_COMMON_ADD(ACTOR_DID, OPPORNENT_DID, MODIFIER_DID, PARENT_TOKEN_NAME, TOKEN_NUM)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIM MODIFIER_DID
#DIMS PARENT_TOKEN_NAME
#DIM  TOKEN_NUM

RESULT:0 = CC_GET_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID, "EFFECT_RATE")
RETURNF RESULT:0
;-------------------------------------------------
;;; rate x トークン個数を足す
;-------------------------------------------------
@CC_SP_TOKEN_MODIFIER_COMMON_ADD_PER_TOKEN(ACTOR_DID, OPPORNENT_DID, MODIFIER_DID, PARENT_TOKEN_NAME, TOKEN_NUM)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIM MODIFIER_DID
#DIMS PARENT_TOKEN_NAME
#DIM  TOKEN_NUM

RESULT:0 = CC_GET_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID, "EFFECT_RATE") * TOKEN_NUM
RETURNF RESULT:0
;-------------------------------------------------
;;; rateを引く
;-------------------------------------------------
@CC_SP_TOKEN_MODIFIER_COMMON_SUB(ACTOR_DID, OPPORNENT_DID, MODIFIER_DID, PARENT_TOKEN_NAME, TOKEN_NUM)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIM MODIFIER_DID
#DIMS PARENT_TOKEN_NAME
#DIM  TOKEN_NUM

RESULT:0 = -1 * CC_GET_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID, "EFFECT_RATE")
RETURNF RESULT:0
;-------------------------------------------------
;;; rate x トークン個数を引く
;-------------------------------------------------
@CC_SP_TOKEN_MODIFIER_COMMON_SUB_PER_TOKEN(ACTOR_DID, OPPORNENT_DID, MODIFIER_DID, PARENT_TOKEN_NAME, TOKEN_NUM)
#FUNCTION
#DIM ACTOR_DID
#DIM OPPORNENT_DID
#DIM MODIFIER_DID
#DIMS PARENT_TOKEN_NAME
#DIM  TOKEN_NUM

RESULT:0 = -1 * CC_GET_SP_TOKEN_MODIFIER_PARAMS(MODIFIER_DID, "EFFECT_RATE") * TOKEN_NUM
RETURNF RESULT:0


code:
;-------------------------------------------------
;スキル処理時に共通的に使用するパラメータ群及び処理を共通化する
;-------------------------------------------------
;パラメータ初期化
@CCS_INIT_PARAM()
CCS_ATK_CHARA_NAME '= ""
CCS_DEF_CHARA_NAME '= ""
CCS_ATK_CHARA_ID = 0
CCS_DEF_CHARA_ID = 0
CCS_ATK_SIDE = 0
CCS_DEF_SIDE = 0
CCS_EQUIP_DID = 0

CCS_SKILL_DEF_NAME '= ""
CCS_SKILL_NAME '= ""
CCS_SKILL_LV = 0
CCS_SKILL_COOLTIME = 0
CCS_EFFECT_RATE = 0
CCS_EFFECT_RATE2 = 0
CCS_EFFECT_RATE3 = 0
CCS_REQTOKEN_TOCAST = 0
CCS_SKILL_SLOT = 0
CCS_SKILL_SLOT_DID = 0

IF !MAP_EXIST(CCS_MAP_SKILL_VALUES)
    MAP_CREATE CCS_MAP_SKILL_VALUES
ELSE
    MAP_CLEAR CCS_MAP_SKILL_VALUES
ENDIF

;-------------------------------------------------
; パラメータ登録
;-------------------------------------------------
@CCS_SET_PARAM(ATTACKER_DID, DEFENDER_DID, XML_SKILL, EQUIP_DID = 0)
#DIM  ATTACKER_DID
#DIM  DEFENDER_DID
#DIMS XML_SKILL
#DIM  EQUIP_DID
#DIM  DYNAMIC IS_PLAYABLE
#DIM  DYNAMIC IS_ACTIVE_SKILL

;キャラ名を取得
CCS_ATK_CHARA_NAME = %DT_CELL_GETS("CC_ACTOR", ATTACKER_DID, "CHARA_NAME", 1)%
CCS_DEF_CHARA_NAME = %DT_CELL_GETS("CC_ACTOR", DEFENDER_DID, "CHARA_NAME", 1)%
;キャラ登録番号を取得
CCS_ATK_CHARA_ID = DT_CELL_GET("CC_ACTOR", ATTACKER_DID, "CHARA_ID", 1)
CCS_DEF_CHARA_ID = DT_CELL_GET("CC_ACTOR", DEFENDER_DID, "CHARA_ID", 1)
;キャラクターがどちらの側で参戦しているか
CCS_ATK_SIDE = DT_CELL_GET("CC_ACTOR", ATTACKER_DID, "SIDE", 1)
CCS_DEF_SIDE = DT_CELL_GET("CC_ACTOR", DEFENDER_DID, "SIDE", 1)
;キャラクターが操作可能キャラかどうか
CCS_ATK_IS_PLAYABLE = DT_CELL_GET("CC_ACTOR", ATTACKER_DID, "IS_PLAYABLE", 1)
CCS_DEF_IS_PLAYABLE = DT_CELL_GET("CC_ACTOR", DEFENDER_DID, "IS_PLAYABLE", 1)

;渡されたスキルXMLがアクティブスキルかを判定
XML_GET XML_SKILL, "//subcategory", RESULTS, 1
IF RESULT && RESULTS == "ACTIVE"
    IS_ACTIVE_SKILL = 1
ENDIF

IF IS_ACTIVE_SKILL
    ;アクティブスキルのスロット番号を取得
    IF !CC_スキル再発動
        CCS_SKILL_SLOT = DT_CELL_GET("CC_ACTOR", ATTACKER_DID, "SELECTED_SKILL_SLOT", 1)
    ELSE
        CCS_SKILL_SLOT = CC_再発動元スキルスロット
    ENDIF

    IS_PLAYABLE = DT_CELL_GET("CC_ACTOR", ATTACKER_DID, "IS_PLAYABLE", 1)
    ;スキル発動に使用した装備情報を取得、装備スキルでなければ0
    IF IS_PLAYABLE
        DT_SELECT "CC_SKILL_SLOT",@"CHARA_ID = {CCS_ATK_CHARA_ID} AND SKILL_SLOT_IDX = {CCS_SKILL_SLOT}",, CCS_SKILL_SLOT_DID
        CCS_EQUIP_DID = DT_CELL_GET("CC_SKILL_SLOT", CCS_SKILL_SLOT_DID, "EQUIP_DID", 1)
    ENDIF
ELSE
    CCS_EQUIP_DID = EQUIP_DID
ENDIF

;スキル定義情報の取得
CALL SKILL_GET_PARAMS_TO_TABLE(XML_SKILL, ATTACKER_DID, CCS_EQUIP_DID)
SIF !RESULT
    RETURN 0
CCS_SKILL_DEF_NAME       =  %DT_CELL_GETS("SKILL_PARAMS", 0, "SKILL_DEF_NAME")%
CCS_SKILL_NAME       =  %DT_CELL_GETS("SKILL_PARAMS", 0, "SKILL_NAME")%
CCS_EFFECT_RATE      = DT_CELL_GET("SKILL_PARAMS", 0, "EFFECT_RATE")
CCS_EFFECT_RATE2      = DT_CELL_GET("SKILL_PARAMS", 0, "EFFECT_RATE2")
CCS_EFFECT_RATE3      = DT_CELL_GET("SKILL_PARAMS", 0, "EFFECT_RATE3")
CCS_SKILL_COOLTIME   = DT_CELL_GET("SKILL_PARAMS", 0, "COOLTIME")
CCS_REQTOKEN_TOCAST   = %DT_CELL_GETS("SKILL_PARAMS", 0, "REQTOKEN_TOCAST")%
CCS_SKILL_LV          = DT_CELL_GET("SKILL_PARAMS", 0, "SKILL_LV")

;スキル効果の上書き
VARS ENEMY_AI
ENEMY_AI = %DT_CELL_GETS("CC_ACTOR", ATTACKER_DID, "ENEMY_AI", 1)%
IF DIC_CONTAINSKEY(ENEMY_AI, "SKILL_OVERRIDE_FUNC")
    CALL CCS_SKILL_OVERRIDE_FUNC(ATTACKER_DID, DIC_GET(ENEMY_AI, "SKILL_OVERRIDE_FUNC"))
ENDIF
;-------------------------------------------------
;;; クールタイム加算処理
;;; 予め @CCS_SET_PARAM が実行されていること
;-------------------------------------------------
@CCS_ADD_COOLTIME()
IF CCS_ATK_IS_PLAYABLE && CCS_SKILL_SLOT != -1
    DT_CELL_SET "CC_SKILL_SLOT", CCS_SKILL_SLOT_DID, "COOLTIME", CCS_SKILL_COOLTIME, 1
ENDIF

;-------------------------------------------------
;;; 増援可否判定
;;; メンバーに空きがあるか確認する
;-------------------------------------------------
@CCS_CAN_SUMMON(CHARA_DID, SKILL_DEF_NAME, IS_WPN_SKILL = 0)
#DIM  CHARA_DID
#DIMS SKILL_DEF_NAME
#DIM  GENRE
#DIM  IS_WPN_SKILL
#DIM  DYNAMIC SIDE
#DIM  DYNAMIC MEM_CNT

SIDE = DT_CELL_GET("CC_ACTOR", CHARA_DID, "SIDE", 1)
MEM_CNT = DT_SELECT("CC_ACTOR", @"SIDE = {SIDE}")
IF MEM_CNT >= CC_MAX_MEMBER_NUM / 2
    RETURN 0
ELSE
    RETURN 1
ENDIF

;-------------------------------------------------
;;; スキル再発動処理
;;; 予め @CCS_SET_PARAM が実行されていること
;-------------------------------------------------
@CCS_SKILL_REUSE()
CC_LIST_SKILL_FUNC_CALLEE = %LIST_ADD(CC_LIST_SKILL_FUNC_CALLEE, CCS_SKILL_DEF_NAME)%
CC_スキル再発動 = 1
CC_再発動元スキルスロット = CCS_SKILL_SLOT
CC_攻撃回数 ++

;-------------------------------------------------
;;; CCS_MAP_SKILL_VALUESに保存したラベル付き値の取得
;;; XMLにvalue/@labelで定義
;-------------------------------------------------
@CCS_SKILL_GET_LABELED_VALUE(LABEL)
#FUNCTION
#DIMS LABEL

RETURNF TOINT(MAP_GET(CCS_MAP_SKILL_VALUES, LABEL))

@CCS_SKILL_GETS_LABELED_VALUE(LABEL)
#FUNCTIONS
#DIMS LABEL

RETURNF MAP_GET(CCS_MAP_SKILL_VALUES, LABEL)

;-------------------------------------------------
;;; ラベル付き値の直接取得
;-------------------------------------------------
@CC_SKILL_GETS_LABELED_VALUE_FROM_XML(SKILL_DEF_NAME, SKILL_LV, LABEL, XML_ID = XMLID_SKILL_BATTLE)
#FUNCTIONS
#DIMS SKILL_DEF_NAME
#DIM  SKILL_LV
#DIMS LABEL
#DIM  XML_ID

;ラベル付き効果量
;modifierと分けるため、defname直下のみ取得
XML_GET XML_ID, @"//defname[@parentname='%SKILL_DEF_NAME%']/value[@label='%LABEL%']/li[{SKILL_LV}]", RESULTS, 1

RETURNF RESULTS

;-------------------------------------------------
;;; ラベル付き値の直接取得
;-------------------------------------------------
@CC_SKILL_GET_LABELED_VALUE_FROM_XML(SKILL_DEF_NAME, SKILL_LV, LABEL, XML_ID = XMLID_SKILL_BATTLE)
#FUNCTION
#DIMS SKILL_DEF_NAME
#DIM  SKILL_LV
#DIMS LABEL
#DIM  XML_ID

RETURNF TOINT(CC_SKILL_GETS_LABELED_VALUE_FROM_XML(SKILL_DEF_NAME, SKILL_LV, LABEL, XML_ID))

;-------------------------------------------------
;;; CHARA_IDからラベル付き値の直接取得
;;; 武器スキルは最大値しか取れない
;-------------------------------------------------
@SKILL_GETS_LABELED_VALUE_BY_CHARA_ID(CHARA_ID, SKILL_DEF_NAME, LABEL, MAJOR_GENRE = スキル_大分類_冒険, IS_WPN_SKILL = 0, GENRE = スキル_ジャンル_戦闘)
#FUNCTIONS
#DIM  CHARA_ID
#DIMS SKILL_DEF_NAME
#DIM  SKILL_LV
#DIMS LABEL
#DIM  IS_WPN_SKILL
#DIM  MAJOR_GENRE
#DIM  GENRE
#DIMS DYNAMIC _XML_SKILL

SKILL_LV = HAS_SKILL(CHARA_ID, SKILL_DEF_NAME, MAJOR_GENRE)
IF SKILL_LV
    ;ラベル付き効果量
    ;modifierと分けるため、defname直下のみ取得
    IF !IS_WPN_SKILL
        XML_GET XMLID_SKILL:GENRE, @"//defname[@parentname='%SKILL_DEF_NAME%']/value[@label='%LABEL%']/li[{SKILL_LV}]", RESULTS, 1
    ELSE
        XML_GET XMLID_WPN_SKILL:GENRE, @"//defname[@parentname='%SKILL_DEF_NAME%']/value[@label='%LABEL%']/li[{SKILL_LV}]", RESULTS, 1
    ENDIF
    RETURNF RESULTS
ELSE
    RETURNF ""
ENDIF

@SKILL_GET_LABELED_VALUE_BY_CHARA_ID(CHARA_ID, SKILL_DEF_NAME, LABEL, MAJOR_GENRE = スキル_大分類_冒険, IS_WPN_SKILL = 0, GENRE = スキル_ジャンル_戦闘)
#FUNCTION
#DIM  CHARA_ID
#DIMS SKILL_DEF_NAME
#DIM  SKILL_LV
#DIMS LABEL
#DIM  IS_WPN_SKILL
#DIM  MAJOR_GENRE
#DIM  GENRE
#DIMS DYNAMIC _XML_SKILL

RETURNF TOINT(SKILL_GETS_LABELED_VALUE_BY_CHARA_ID(CHARA_ID, SKILL_DEF_NAME, LABEL, MAJOR_GENRE, IS_WPN_SKILL, GENRE))


code:
;-------------------------------------------------
; スキル処理の共通変数
; スキル関数ごとに宣言すると冗長になるため、共通化する
; 全て @CCS_INIT_PARAM で初期化される
;-------------------------------------------------
;キャラ情報
#DIMS  CCS_ATK_CHARA_NAME
#DIMS  CCS_DEF_CHARA_NAME
#DIM   CCS_ATK_CHARA_ID
#DIM   CCS_DEF_CHARA_ID
#DIM   CCS_ATK_SIDE
#DIM   CCS_DEF_SIDE
#DIM   CCS_ATK_IS_PLAYABLE
#DIM   CCS_DEF_IS_PLAYABLE
;装備情報
;スキル発動に使用した装備情報を取得、装備スキルでなければ0
#DIM   CCS_EQUIP_DID
;スキル情報
#DIMS  CCS_SKILL_DEF_NAME
#DIMS  CCS_SKILL_NAME
#DIM   CCS_SKILL_LV
#DIM   CCS_SKILL_COOLTIME
#DIM   CCS_EFFECT_RATE
#DIM   CCS_EFFECT_RATE2
#DIM   CCS_EFFECT_RATE3
#DIMS  CCS_REQTOKEN_TOCAST
#DIM   CCS_SKILL_SLOT
#DIM   CCS_SKILL_SLOT_DID

#DIMS CONST CCS_MAP_SKILL_VALUES = "CCS_MAP_SKILL_VALUES"


code:
;-------------------------------------------------
; 攻撃時に実行される武器スキル
; 実行タイミング AFTER_NORMAL_ATTACK
;-------------------------------------------------
;攻撃時のバステ加算系スキル
@CC_WPN_ADD_BAD_STATUS(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, WEAPON_DID)
#DIM ATTACKER_DID
#DIM DEFENDER_DID
#DIMS _XML_SKILL
#DIM  WEAPON_DID

#DIM TRIGGER_ID
#DIM DYNAMIC SEQUENCE

CALL CC_SKILL_TRIGGER_INIT(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, "ADD_TO_CURRENT_BLOCK", WEAPON_DID)
TRIGGER_ID = RESULT

;別の装備が同じかより高いスキルレベルの同一スキルを保持している場合は処理を見送る
IF HAS_SKILL(CCS_ATK_CHARA_ID, CCS_SKILL_DEF_NAME, スキル_大分類_武器) >= CCS_SKILL_LV && RESULT:1 != WEAPON_DID
    DEBUGPRINTFORML 別の装備が同じかより高いスキルレベルの同一スキルを保持している場合は処理を見送る
    RETURN 0
ENDIF

;毒付与
SELECTCASE CCS_SKILL_DEF_NAME
    CASE "WPN_ADD_POISON"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE
                ,"FUNCTION_NAME", "CC_ACTION_INFLICT_ABNORMALITY"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", DEFENDER_DID
                ,"TOKEN_NAME", "POISON"
                ,"VALUE", CCS_EFFECT_RATE
                ,"SUCCESS_RATE", 100
        }
    CASEELSE
        RETURN 0
ENDSELECT

RETURN TRIGGER_ID

;攻撃時のバフ加算系スキル
@CC_WPN_ADD_GOOD_STATUS(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, WEAPON_DID)
#DIM ATTACKER_DID
#DIM DEFENDER_DID
#DIMS _XML_SKILL
#DIM  WEAPON_DID
#DIM  ACTION_DID

#DIM TRIGGER_ID
#DIM DYNAMIC SEQUENCE

CALL CC_SKILL_TRIGGER_INIT(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, "ADD_TO_CURRENT_BLOCK", WEAPON_DID)
TRIGGER_ID = RESULT

;別の装備が同じかより高いスキルレベルの同一スキルを保持している場合は処理を見送る
IF HAS_SKILL(CCS_ATK_CHARA_ID, CCS_SKILL_DEF_NAME, スキル_大分類_武器) >= CCS_SKILL_LV && RESULT:1 != WEAPON_DID
    DEBUGPRINTFORML 別の装備が同じかより高いスキルレベルの同一スキルを保持している場合は処理を見送る
    RETURN 0
ENDIF

;看破付与
SELECTCASE CCS_SKILL_DEF_NAME
    CASE "WPN_ADD_SEE_THROUGH"
		CALL CC_ACTION_MANAGER_("GET_CURRENT_ACTION_DID")
		ACTION_DID = RESULT
		IF CC_AFLAG(ACTION_DID, "CRITICAL_HIT")
			{
				DT_ROW_ADD "CC_ACTION"
					,"TRIGGER_ID", TRIGGER_ID
					,"SEQUENCE", SEQUENCE
					,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
					,"ACTOR_DID", ATTACKER_DID
					,"TARGET_DID", ATTACKER_DID
					,"TOKEN_NAME", "SEE_THROUGH"
					,"VALUE", CCS_EFFECT_RATE
			}
		ELSE
			RETURN 0
		ENDIF
    CASEELSE
        RETURN 0
ENDSELECT

RETURN TRIGGER_ID
;-------------------------------------------------
; 攻撃前に実行される武器スキル
; 実行タイミング BEFORE_ATTACK
;-------------------------------------------------
@CC_WPN_ADDITIONAL_ATTACK(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, WEAPON_DID)
#DIM ATTACKER_DID
#DIM DEFENDER_DID
#DIMS _XML_SKILL
#DIM WEAPON_DID

#DIM TRIGGER_ID
#DIM DYNAMIC SEQUENCE

;別の装備が同じかより高いスキルレベルの同一スキルを保持している場合は処理を見送る
; ->追撃は加算する
; IF HAS_SKILL(ATK_CHARA_ID, SKILL_DEF_NAME, スキル_大分類_武器) >= SKILL_LV && RESULT:1 != WEAPON_DID
;     RETURN 0
; ENDIF

CALL CC_SKILL_TRIGGER_INIT(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, "ADD_NEW_BLOCK_TO_BOTTOM", WEAPON_DID)
TRIGGER_ID = RESULT

SELECTCASE CCS_SKILL_DEF_NAME
        ;武器パッシブスキル<追撃>
    CASE "WPN_ADDITIONAL_ATTACK"
        ;同じレベルの追撃スキルが複数トリガーされている場合は処理を見送る
        DT_SELECT "CC_TRIGGERED_SKILL", @"SKILL_DEF_NAME = 'WPN_ADDITIONAL_ATTACK' AND SKILL_LV = {CCS_SKILL_LV}"
        IF RESULT > 1
            RETURN 0
        ENDIF
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_NORMAL_ATTACK_BASE_PARAM"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"NUMBER_OF_ATTACKS", 1
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_UPDATE_NORMAL_ATTACK_BASE_DAMAGE"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"VALUE", CCS_EFFECT_RATE
        }
    CASEELSE
        RETURN 0
ENDSELECT
RETURN TRIGGER_ID

;-------------------------------------------------
; 攻撃対象の撃破時に実行される武器スキル
; 実行タイミング DEFEAT_ENEMY
;-------------------------------------------------
@CC_WPN_DEFEAT_ENEMY_SKILL(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, WEAPON_DID)
#DIM ATTACKER_DID
#DIM DEFENDER_DID
#DIMS _XML_SKILL
#DIM WEAPON_DID

#DIM TRIGGER_ID
#DIM DYNAMIC SEQUENCE

CALL CC_SKILL_TRIGGER_INIT(ATTACKER_DID, DEFENDER_DID, _XML_SKILL, "ADD_NEW_BLOCK_TO_TOP", WEAPON_DID)
TRIGGER_ID = RESULT

;別の装備が同じかより高いスキルレベルの同一スキルを保持している場合は処理を見送る
SIF HAS_SKILL(CCS_ATK_CHARA_ID, CCS_SKILL_DEF_NAME, スキル_大分類_武器) >= CCS_SKILL_LV && RESULT:1 != WEAPON_DID
    RETURN 0

SELECTCASE CCS_SKILL_DEF_NAME
        ;武器パッシブスキル<蹂躙>
    CASE "WPN_TRAMPLE"
        IF RAND:100 < CCS_EFFECT_RATE
            {
                DT_ROW_ADD "CC_ACTION"
                    ,"TRIGGER_ID", TRIGGER_ID
                    ,"SEQUENCE", SEQUENCE++
                    ,"FUNCTION_NAME", "CC_ACTION_SET_SP_TOKEN"
                    ,"ACTOR_DID", ATTACKER_DID
                    ,"TARGET_DID", ATTACKER_DID
                    ,"TOKEN_NAME", "REACT"
                    ,"VALUE", 1
                    ,"ABORT_CONDITION", "{CC_SP_TOKEN_NUM(CC_GET_ACT_INFO(ACTION_DID, \"ACTOR_DID\"), \"REACT\") != 0}"
            }
            ;アクションの解決前に別の蹂躙が発動すると重複発動するのでABORT条件を入れる
            CALL CC_SET_ACT_FLAG_BY_ID(RESULT, "DEF_CHARA_NAME", CCS_DEF_CHARA_NAME)
        ELSE
            RETURN 0
        ENDIF
    CASEELSE
        RETURN 0
ENDSELECT
RETURN TRIGGER_ID


code:
;-------------------------------------------------
;自己強化系スキル全般
;-------------------------------------------------
@CC_ACTIVESKILL_ADD_SELF_BUFF(ATTACKER_DID, DEFENDER_DID, XML_SKILL)
; #region
#DIM  ATTACKER_DID
#DIM  DEFENDER_DID
#DIMS XML_SKILL

#DIM TRIGGER_ID
#DIM DYNAMIC SEQUENCE

;スキル固有の変数
#DIM  DYNAMIC TOKEN_COUNT
#DIM  DYNAMIC IDX, CC_MAX_MEMBER_NUM

;スキル処理用パラメータの初期化と取得
CALL CC_SKILL_TRIGGER_INIT(ATTACKER_DID, DEFENDER_DID, XML_SKILL, "ADD_NEW_BLOCK_TO_BOTTOM")
TRIGGER_ID = RESULT

;効果
SELECTCASE CCS_SKILL_DEF_NAME
        ;◆前衛防御
    CASE "ACT_FRONT_DEFENCE", "WPN_FRONT_DEFENCE"
        CC_SE '= "Guard_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "PROVOKE"
                ,"VALUE", CCS_EFFECT_RATE
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "GUARD"
                ,"VALUE", CCS_EFFECT_RATE
        }
        IF HAS_SKILL(CCS_ATK_CHARA_ID, "K13_UNIQUE_SKILL_REARGUARD")
            {
                DT_ROW_ADD "CC_ACTION"
                    ,"TRIGGER_ID", TRIGGER_ID
                    ,"SEQUENCE", SEQUENCE++
                    ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                    ,"ACTOR_DID", ATTACKER_DID
                    ,"TARGET_DID", ATTACKER_DID
                    ,"TOKEN_NAME", "MAG_GUARD"
                    ,"VALUE", CCS_EFFECT_RATE
            }
            CALL CC_SET_ACT_FLAG_BY_ID(RESULT, "K13_UNIQUE_SKILL_REARGUARD", "1")
        ENDIF

        ;◆ハイディング
    CASE "ACT_HIDING", "WPN_ACT_HIDING"
        CC_SE '= "Speed_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "HIDE"
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;◆デコイ
    CASE "ACT_DEPLOY_DECOY"
        CC_SE '= "Speed_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "DECOY"
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;◆イーグルアイ
    CASE "ACT_EAGLE_EYE"
        CC_SE '= "Charge_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "SEE_THROUGH"
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;◆リアクト
    CASE "ACT_REACT"
        CC_SE '= "Skill_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "REACT"
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;クールタイムを持たないエネミーに対してリアクト連続使用を制約するためのフラグを立てる
        IF !CCS_ATK_IS_PLAYABLE
            CALL CC_SET_ACTOR_FLAG(ATTACKER_DID, "REACT_USED", 1)
        ENDIF
        ;◆分身の術
    CASE "ACT_SHADOW_CLONING", "ACT_SHADOW_CLONING_ALTER"
        CALL CC_COST_ITEM_TOCAST(ATTACKER_DID, CCS_SKILL_DEF_NAME)
        IF RESULT
            CC_SE '= "Explode_2.mp3"
            {
                DT_ROW_ADD "CC_ACTION"
                    ,"TRIGGER_ID", TRIGGER_ID
                    ,"SEQUENCE", SEQUENCE++
                    ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                    ,"ACTOR_DID", ATTACKER_DID
                    ,"TARGET_DID", ATTACKER_DID
                    ,"TOKEN_NAME", "DECOY_SHADOW"
                    ,"VALUE", CCS_EFFECT_RATE
            }
            ;[陰忍]保有時は[挑発]ではなく[隠蔽]を付与
            IF HAS_SKILL(CCS_ATK_CHARA_ID, "OPENING_SHADOW_HIDDEN", スキル_大分類_冒険)
                {
                    DT_ROW_ADD "CC_ACTION"
                        ,"TRIGGER_ID", TRIGGER_ID
                        ,"SEQUENCE", SEQUENCE++
                        ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                        ,"ACTOR_DID", ATTACKER_DID
                        ,"TARGET_DID", ATTACKER_DID
                        ,"TOKEN_NAME", "HIDE"
                        ,"VALUE", CCS_EFFECT_RATE2 + 1
                }
            ELSE
                {
                    DT_ROW_ADD "CC_ACTION"
                        ,"TRIGGER_ID", TRIGGER_ID
                        ,"SEQUENCE", SEQUENCE++
                        ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                        ,"ACTOR_DID", ATTACKER_DID
                        ,"TARGET_DID", ATTACKER_DID
                        ,"TOKEN_NAME", "PROVOKE"
                        ,"VALUE", CCS_EFFECT_RATE2
                }
            ENDIF
        ELSE
            {
                DT_ROW_ADD "CC_ACTION"
                    ,"TRIGGER_ID", TRIGGER_ID
                    ,"SEQUENCE", SEQUENCE++
                    ,"FUNCTION_NAME", "CC_ACTION_MESSAGE"
                    ,"ACTOR_DID", ATTACKER_DID
                    ,"TARGET_DID", DEFENDER_DID
            }
            CALL CC_SET_ACT_FLAG_BY_ID(RESULT, "LACK_ITEM", "1")
            RETURN TRIGGER_ID
        ENDIF

        ;◆スペルブースト
    CASE "WPN_ADD_CAST_SELF"
        CC_SE '= "Charge_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "CAST"
                ,"VALUE", CCS_EFFECT_RATE
        }

        ;◆ルーンシールド
    CASE "WPN_ADD_MAG_GUARD"
        CC_SE '= "Guard_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "MAG_GUARD"
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;◆モードシフト
    CASE "EMEMY_ACT_ATTACK_SHIFT"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "MODE_SHIFT"
                ,"VALUE", 3000
        }
        ;◆暴風のヴェール
    CASE "EMEMY_WIND_DEFENCE", "WPN_WIND_DEFENCE"
        CC_SE '= "Wind_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "COUNTER_ATTACK"
                ,"VALUE", CCS_EFFECT_RATE
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "PROVOKE"
                ,"VALUE", CCS_EFFECT_RATE
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "BARRIER"
                ,"VALUE", CCS_EFFECT_RATE2
        }
        ;◆女中的旋刃、薙ぎ払い
    CASE "ACT_NORMAL_ATTACK_ALL", "EMEMY_NORMAL_ATTACK_ALL"
        SIF !HAS_SKILL(CCS_ATK_CHARA_ID, "ACT_NORMAL_ATTACK_ALL", スキル_大分類_冒険)
            CALL CC_COST_SP_TOKEN_TOCAST(ATTACKER_DID, CCS_REQTOKEN_TOCAST)
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_SET_NORMAL_ATTACK_ALL"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_UPDATE_NORMAL_ATTACK_BASE_DAMAGE"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;◆じょちゅーてきせんじん
    CASE "ACT_LINA_ATTACK_ALL"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_SET_NORMAL_ATTACK_ALL"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_UPDATE_NORMAL_ATTACK_BASE_DAMAGE"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"VALUE", CCS_EFFECT_RATE
        }
        ;スキル発動者の敵側のメンバーを全員取得(戦闘不能除く)
        DT_SELECT "CC_ACTOR", @"SIDE = {CCS_DEF_SIDE} AND NOT STATE = '戦闘不能'",, IDX
        FOR LOCAL, 0, RESULT
            {
                DT_ROW_ADD "CC_ACTION"
                    ,"TRIGGER_ID", TRIGGER_ID
                    ,"SEQUENCE", SEQUENCE++
                    ,"FUNCTION_NAME", "CC_ACTION_SET_SP_TOKEN"
                    ,"ACTOR_DID", ATTACKER_DID
                    ,"TARGET_DID", IDX:LOCAL
                    ,"TOKEN_NAME", "STAGGER"
                    ,"VALUE", CCS_EFFECT_RATE2
            }
        NEXT
        ;◆スナイピング
    CASE "ACT_SNIPING"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "SEE_THROUGH"
                ,"VALUE", CCS_EFFECT_RATE
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_UPDATE_NORMAL_ATTACK_BASE_DAMAGE"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"VALUE", CCS_EFFECT_RATE2
        }
        ;◆竜の剛鱗
    CASE "ENEMY_SKILL_SCALE_EXPAND"
        CALL CC_COST_SP_TOKEN_TOCAST(ATTACKER_DID, CCS_REQTOKEN_TOCAST)
        CC_SE '= "Clash_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "GUARD"
                ,"VALUE", CCS_EFFECT_RATE2
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "PROVOKE"
                ,"VALUE", CCS_EFFECT_RATE2
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "BARRIER"
                ,"VALUE", CCS_EFFECT_RATE3
        }
        ;◆竜の死蝋
    CASE "ENEMY_DRAGON_ADIPOCERE"
        CALL CC_COST_SP_TOKEN_TOCAST(ATTACKER_DID, CCS_REQTOKEN_TOCAST)
        CC_SE '= "Poison_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "DEAD_DRIP"
                ,"VALUE", CCS_EFFECT_RATE2
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "BARRIER"
                ,"VALUE", CCS_EFFECT_RATE3
        }
        CC_SE '= "Poison_0.mp3"
        ;◆盾鳴らし
    CASE "ACT_SHIELD_BANGING", "WPN_SHIELD_BANGING"
        CC_SE '= "Slash_4.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_SET_ACTOR_STATE"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"DEF_NAME", "[SUBSTATE:防御]"
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "PROVOKE"
                ,"VALUE", CCS_SKILL_GET_LABELED_VALUE("PROVOKE_TOKEN_NUM")
        }
        ;◆聖句
    CASE "ACT_ADD_PRAYER_TOKEN"
        VARI BARRIER_NUM
        ;RATEに基づいたバリアの値をセット
        BARRIER_NUM = FTIMES(DT_CELL_GET("CC_ACTOR", ATTACKER_DID, "ARMOR", 1), CCS_SKILL_GET_LABELED_VALUE("BARRIER_RATE"))

        CC_SE '= "Heal_0.mp3"
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "PRAYER"
                ,"VALUE", CCS_SKILL_GET_LABELED_VALUE("PRAYER_TOKEN_NUM")
        }
        {
            DT_ROW_ADD "CC_ACTION"
                ,"TRIGGER_ID", TRIGGER_ID
                ,"SEQUENCE", SEQUENCE++
                ,"FUNCTION_NAME", "CC_ACTION_ADD_SP_TOKEN"
                ,"ACTOR_DID", ATTACKER_DID
                ,"TARGET_DID", ATTACKER_DID
                ,"TOKEN_NAME", "BARRIER"
                ,"VALUE", BARRIER_NUM
        }
    CASEELSE
        RETURN 0
ENDSELECT

;クールタイム処理
CALL CCS_ADD_COOLTIME()

RETURN TRIGGER_ID
; #endregion