Changeset 72 for pycgibattler/trunk


Ignore:
Timestamp:
12/23/10 01:05:41 (13 years ago)
Author:
atzm
Message:

change skill definition

Location:
pycgibattler/trunk
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • pycgibattler/trunk/characters/skill_list.json

    r62 r72  
    1 エターナルフォースブリザード 
    2 アルティメット・ダーク・ファイアー・スラッシュ 
    3 バーニング・ダーク・フレイム・オブ・ディッセンバー 
    4 聖夢魔心裂断 
    5 義憐聖霊斬 
    6 シャイニングジャスティス 
    7 ティーガー・マシーネン・ピストーレ 
    8 インフェルノ・オブ・メサイア 
    9 フォン・ド・ボー 
    10 ファイナル・タクティクス・ハイド 
    11 コーヒー・ルンバ 
    12 ルート・ファン・ニステルローイ 
     1[ 
     2    { 
     3        "name":  "エターナルフォースブリザード", 
     4        "type":  "SuicideAttackType", 
     5        "level": 3, 
     6        "point": 20 
     7    }, 
     8    { 
     9        "name": "アルティメット・ダーク・ファイアー・スラッシュ", 
     10        "type": "SingleAttackType", 
     11        "level": 3, 
     12        "point": 15 
     13    }, 
     14    { 
     15        "name": "バーニング・ダーク・フレイム・オブ・ディッセンバー", 
     16        "type": "MultiAttackType", 
     17        "level": 3, 
     18        "point": 20 
     19    }, 
     20    { 
     21        "name": "聖夢魔心裂断", 
     22        "type": "RangeAttackType", 
     23        "level": 3, 
     24        "point": 17 
     25    }, 
     26    { 
     27        "name": "義憐聖霊斬", 
     28        "type": "SingleAttackType", 
     29        "level": 2, 
     30        "point": 10 
     31    }, 
     32    { 
     33        "name": "シャイニングジャスティス", 
     34        "type": "MultiAttackType", 
     35        "level": 2, 
     36        "point": 15 
     37    }, 
     38    { 
     39        "name": "ティーガー・マシーネン・ピストーレ", 
     40        "type": "RangeAttackType", 
     41        "level": 2, 
     42        "point": 13 
     43    }, 
     44    { 
     45        "name": "インフェルノ・オブ・メサイア", 
     46        "type": "SuicideAttackType", 
     47        "level": 2, 
     48        "point": 18 
     49    }, 
     50    { 
     51        "name": "フォン・ド・ボー", 
     52        "type": "HealType", 
     53        "level": 3, 
     54        "point": 7 
     55    }, 
     56    { 
     57        "name": "ファイナル・タクティクス・ハイド", 
     58        "type": "SuicideAttackType", 
     59        "level": 1, 
     60        "point": 6 
     61    }, 
     62    { 
     63        "name": "コーヒー・ルンバ", 
     64        "type": "ResurrectionType", 
     65        "level": 3, 
     66        "point": 1 
     67    }, 
     68    { 
     69        "name": "ルート・ファン・ニステルローイ", 
     70        "type": "RangeAttackType", 
     71        "level": 1, 
     72        "point": 5 
     73    } 
     74] 
  • pycgibattler/trunk/index.cgi

    r67 r72  
    99import sys 
    1010import cgi 
     11import json 
    1112import glob 
    1213import copy 
     
    123124        chara_names = [x.strip() for x in open(os.path.expanduser( 
    124125            CONFIG.get('character', 'name_list_file'))).xreadlines()] 
    125         skill_names = [x.strip() for x in open(os.path.expanduser( 
    126             CONFIG.get('character', 'skill_list_file'))).xreadlines()] 
    127         skill_types = [ 
    128             #pycodebattler.skill.HealType, 
    129             #pycodebattler.skill.ResurrectionType, 
    130             pycodebattler.skill.SingleAttackType, 
    131             pycodebattler.skill.RangeAttackType, 
    132             pycodebattler.skill.MultiAttackType, 
    133             pycodebattler.skill.SuicideAttackType, 
    134         ] 
     126        skill_data = json.load(open(CONFIG.get('character', 'skill_list_file'))) 
    135127 
    136128        lc = ListChooser(code) 
     
    140132        for i in range(lc.choose(range(1, 4))): 
    141133            lc.lslide(i) 
    142             skname = lc.choose(skill_names) 
    143             sktype = lc.choose(skill_types) 
    144             sklevel = lc.choose(range(1, 4)) 
    145             skpoint = lc.choose(range(sklevel * 4, sklevel * 7)) 
     134            sk = lc.choose(skill_data) 
     135            skname = sk['name'] 
     136            skpoint = sk['point'] 
     137            sktype = getattr(pycodebattler.skill, sk['type']) 
     138            sklevel = sk['level'] 
    146139            sk = pycodebattler.skill.Skill(skname, skpoint, sktype, sklevel) 
    147140            skills.append(sk) 
  • pycgibattler/trunk/pycgibattler.conf.sample

    r64 r72  
    1919[character] 
    2020name_list_file  = characters/name_list.txt 
    21 skill_list_file = characters/skill_list.txt 
     21skill_list_file = characters/skill_list.json 
    2222 
    2323[battle] 
Note: See TracChangeset for help on using the changeset viewer.