Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
package net.pixvi.myr.element.mon
|
||||
{
|
||||
import net.pixvi.common.system.language.lang;
|
||||
import net.pixvi.myr.center.LibCenter;
|
||||
import net.pixvi.myr.center.Table;
|
||||
import net.pixvi.myr.element.bag.ItemVo;
|
||||
|
||||
public class EggVo extends ItemVo
|
||||
{
|
||||
|
||||
public var timeGet:int;
|
||||
|
||||
public function EggVo()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function get timeTotal() : int
|
||||
{
|
||||
return monTable().time_1 + monTable().time_2;
|
||||
}
|
||||
|
||||
override public function get name() : String
|
||||
{
|
||||
if(unlock)
|
||||
{
|
||||
return lang("{0}的蛋",monTable().name);
|
||||
}
|
||||
return lang("未知的蛋");
|
||||
}
|
||||
|
||||
public function get desName() : String
|
||||
{
|
||||
return lang("{0}的蛋",monTable().name);
|
||||
}
|
||||
|
||||
public function get star() : int
|
||||
{
|
||||
return monTable().star;
|
||||
}
|
||||
|
||||
public function get element() : int
|
||||
{
|
||||
return monTable().element;
|
||||
}
|
||||
|
||||
override public function get imgsrc() : String
|
||||
{
|
||||
return "data/img/monster/q/" + type + "_q_0.png";
|
||||
}
|
||||
|
||||
override public function get quality() : int
|
||||
{
|
||||
return star;
|
||||
}
|
||||
|
||||
public function buildMonster() : MonsterVo
|
||||
{
|
||||
var mon:MonsterVo = new MonsterVo(type);
|
||||
mon.process = 0;
|
||||
mon.recNewGet = false;
|
||||
mon.buildRandom();
|
||||
mon.timeGet = timeGet;
|
||||
return mon;
|
||||
}
|
||||
|
||||
public function get imgFix() : Object
|
||||
{
|
||||
return monTable().imgFix["0"];
|
||||
}
|
||||
|
||||
public function get unlock() : Boolean
|
||||
{
|
||||
return LibCenter.getIns().checkUnlock(this.type);
|
||||
}
|
||||
|
||||
override public function getQ(q:int = 1) : int
|
||||
{
|
||||
if(quality == q)
|
||||
{
|
||||
return 90000000 + type;
|
||||
}
|
||||
return quality * 10000000 + type;
|
||||
}
|
||||
|
||||
public function monTable() : Object
|
||||
{
|
||||
return Table.monster_info[this.type];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
package net.pixvi.myr.element.mon
|
||||
{
|
||||
import net.pixvi.pfw.utils.PointLocker;
|
||||
|
||||
public class MonsterAdd
|
||||
{
|
||||
|
||||
public var atk:PointLocker;
|
||||
|
||||
public var def:PointLocker;
|
||||
|
||||
public var hp:PointLocker;
|
||||
|
||||
public var dex:PointLocker;
|
||||
|
||||
public var crit:PointLocker;
|
||||
|
||||
public var atkSpd:PointLocker;
|
||||
|
||||
public var atkVim:PointLocker;
|
||||
|
||||
public var selfCure:PointLocker;
|
||||
|
||||
public var deadBoom:PointLocker;
|
||||
|
||||
public var atkStun:PointLocker;
|
||||
|
||||
public var defStun:PointLocker;
|
||||
|
||||
public var atkPoi:PointLocker;
|
||||
|
||||
public var atkPoiDmg:PointLocker;
|
||||
|
||||
public var apCostSave:PointLocker;
|
||||
|
||||
public var skillCooldown:PointLocker;
|
||||
|
||||
public var sunFire:PointLocker;
|
||||
|
||||
public var moonHeal:PointLocker;
|
||||
|
||||
public var thorns:PointLocker;
|
||||
|
||||
public function MonsterAdd()
|
||||
{
|
||||
super();
|
||||
atk = new PointLocker();
|
||||
def = new PointLocker();
|
||||
hp = new PointLocker();
|
||||
dex = new PointLocker();
|
||||
crit = new PointLocker();
|
||||
atkSpd = new PointLocker();
|
||||
atkVim = new PointLocker();
|
||||
selfCure = new PointLocker();
|
||||
deadBoom = new PointLocker();
|
||||
atkStun = new PointLocker();
|
||||
defStun = new PointLocker();
|
||||
atkPoi = new PointLocker();
|
||||
atkPoiDmg = new PointLocker();
|
||||
apCostSave = new PointLocker();
|
||||
skillCooldown = new PointLocker();
|
||||
sunFire = new PointLocker();
|
||||
moonHeal = new PointLocker();
|
||||
thorns = new PointLocker();
|
||||
}
|
||||
|
||||
public function getRecord() : Object
|
||||
{
|
||||
var obj:Object = {};
|
||||
obj.atk = atk.val;
|
||||
obj.def = def.val;
|
||||
obj.hp = hp.val;
|
||||
obj.dex = dex.val;
|
||||
obj.crit = crit.val;
|
||||
obj.atkSpd = atkSpd.val;
|
||||
obj.atkVim = atkVim.val;
|
||||
obj.selfCure = selfCure.val;
|
||||
obj.deadBoom = deadBoom.val;
|
||||
obj.atkStun = atkStun.val;
|
||||
obj.defStun = defStun.val;
|
||||
obj.atkPoi = atkPoi.val;
|
||||
obj.atkPoiDmg = atkPoiDmg.val;
|
||||
obj.apCostSave = apCostSave.val;
|
||||
obj.skillCooldown = skillCooldown.val;
|
||||
obj.sunFire = sunFire.val;
|
||||
obj.moonHeal = moonHeal.val;
|
||||
obj.thorns = thorns.val;
|
||||
return obj;
|
||||
}
|
||||
|
||||
public function update(data:Object) : void
|
||||
{
|
||||
if(data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for(var key:String in data)
|
||||
{
|
||||
if(this.hasOwnProperty(key))
|
||||
{
|
||||
this[key].val = data[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package net.pixvi.myr.element.mon
|
||||
{
|
||||
public class MonsterProcess
|
||||
{
|
||||
|
||||
public static const IN_STACK:int = 2;
|
||||
|
||||
public static const IN_ROOM:int = 3;
|
||||
|
||||
public function MonsterProcess()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,200 @@
|
||||
package net.pixvi.myr.element.mon
|
||||
{
|
||||
import net.pixvi.common.system.language.lang;
|
||||
import net.pixvi.myr.center.Master;
|
||||
import net.pixvi.myr.center.Table;
|
||||
import net.pixvi.myr.element.bag.EquipVo;
|
||||
|
||||
public class SkinVo
|
||||
{
|
||||
|
||||
public var typeId:int;
|
||||
|
||||
public var normalMonTypeId:int = 0;
|
||||
|
||||
public function SkinVo(typeId:int, normalMonTypeId:int = 0)
|
||||
{
|
||||
super();
|
||||
this.typeId = typeId;
|
||||
this.normalMonTypeId = normalMonTypeId;
|
||||
}
|
||||
|
||||
public function get name() : String
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return lang("初始形象");
|
||||
}
|
||||
return table().name;
|
||||
}
|
||||
|
||||
public function get des() : String
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return lang("魔物没有穿戴时装时的初始形象。");
|
||||
}
|
||||
return table().des;
|
||||
}
|
||||
|
||||
public function get hide() : Boolean
|
||||
{
|
||||
return table().hide;
|
||||
}
|
||||
|
||||
public function get monType() : int
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return table().monType;
|
||||
}
|
||||
|
||||
public function get level() : int
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return table().level;
|
||||
}
|
||||
|
||||
public function get ability() : Object
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return table().ability;
|
||||
}
|
||||
|
||||
public function get motou() : Boolean
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return table().motou;
|
||||
}
|
||||
|
||||
public function get showType() : int
|
||||
{
|
||||
if(typeId > 0)
|
||||
{
|
||||
return typeId;
|
||||
}
|
||||
return normalMonTypeId;
|
||||
}
|
||||
|
||||
public function get motouScripts() : Array
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
return table().motouScripts;
|
||||
}
|
||||
|
||||
public function get voice() : Boolean
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return table().voice;
|
||||
}
|
||||
|
||||
public function get unlockTask() : String
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return table().unlockTask;
|
||||
}
|
||||
|
||||
public function get unlock() : Boolean
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return Master.history.unlockSkins.indexOf(typeId) >= 0;
|
||||
}
|
||||
|
||||
public function getAbilityDes() : String
|
||||
{
|
||||
var para:Object = {};
|
||||
var noability:Boolean = true;
|
||||
for each(var key:String in EquipVo.EQUIP_PARAS)
|
||||
{
|
||||
if(ability[key] != null)
|
||||
{
|
||||
noability = false;
|
||||
para[key] = {"val":ability[key]};
|
||||
}
|
||||
else
|
||||
{
|
||||
para[key] = {"val":0};
|
||||
}
|
||||
}
|
||||
if(noability)
|
||||
{
|
||||
return lang("无");
|
||||
}
|
||||
return EquipVo.getAbilityEffectDes(para).join("<br/>");
|
||||
}
|
||||
|
||||
public function get from() : String
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return table().from;
|
||||
}
|
||||
|
||||
public function get author() : String
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return table().author;
|
||||
}
|
||||
|
||||
public function get cardImg() : String
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return "data/img/monster/skincard/skincard_0.png";
|
||||
}
|
||||
return "data/img/monster/skincard/skincard_" + showType + ".png";
|
||||
}
|
||||
|
||||
public function get cgImg() : String
|
||||
{
|
||||
return "data/img/monster/l/" + showType + "_l_0.png";
|
||||
}
|
||||
|
||||
public function get cgImgFix() : Object
|
||||
{
|
||||
return Table.monster_info[showType].imgFix["l"];
|
||||
}
|
||||
|
||||
public function table() : Object
|
||||
{
|
||||
if(typeId <= 0)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
if(Table.skin_info == null || Table.skin_info[typeId.toString()] == null)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return Table.skin_info[typeId.toString()];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user