示例#1
0
 private void basicInit(PokeJSONObj obj)
 {
     types = Global.types;
     name = obj.species.ToLower();
     type1 = types[obj.types[0].ToLower()];
     if (obj.types.Count < 2)
         type2 = type1;
     else
         type2 = types[obj.types[1].ToLower()];
     stats = obj.baseStats;
     abilities = obj.abilities;
     weight = (float)obj.weightkg;
     deftype = new DefenseType();
     role = new Role();
     realStats = new Dictionary<string, int>();
 }
示例#2
0
 public void modifyRole()
 {
     RoleOverride ro = getRoleOverride();
     if (ro != null) {
                 if (!Object.ReferenceEquals(ro.role, null))
                     this.role = ro.role;
                 if (!Object.ReferenceEquals(ro.deftype, null))
                     this.deftype = ro.deftype;
                 if (!Object.ReferenceEquals(ro.statspread, null))
                     this.statSpread = ro.statspread;
                 if (!Object.ReferenceEquals(ro.item, null))
                     this.item = ro.item;
         }
 }