public override step_target test(order o) { if (o.usecard.state != cardWhere.hand) { return(null); } if (o.usecard.deconposs) { step_target s = new step_target(); return(o.usecard.deconposs.test(s)); } //战吼特殊使用测试 //普通使用测试 else { //测试距离 //if(o.usecard.distance<(o.Target_pos-o.usecard.player().hero.transform.position).magnitude ) //{ return null; } //测试费用 step_target s = new step_target(); s.user = o.usecard; s.targretposs = o.Target_pos; return(s); } }
public out_info(CardTxt which, step_target step, bool p) { D_info = different.doing; isdiffer = false; w = which; s = step; poped = p; }
public void CopyDo_cardTxt(CardTxt cardTxt, step_target data, bool isactive, Host h) { if (isactive) { skill.doCard(cardTxt, data, h); } else { skill.AddTriggered(cardTxt, data); } }
public override bool run_and_Pop(Dictionary <CardTxt, step_target> data) { step_target d = data[this]; //print("-"+damage+d.target.ToString()); HPchange_info ret = d.targetcard.minion.TXT_getdamage(damage, HPchange_K.normal_Dam); if (ret.change < 0) { docall(d.user.host(), new call_HP()); } return(true); }
public virtual bool Do_order(order d) { step_target data = test(d); data = ToDocard.test(data); if (data == null) { return(false); } askHostDo(data, true); return(true); }
//魔法卡 召唤一个fly 飞向mini public override bool run_and_Pop(Dictionary <CardTxt, step_target> data) { step_target d = data[this]; Card1_1fly f = createrMono.creater.aEmptycard <Card1_1fly>(); //2交给玩家变成mini d.user.player().TXT_move_card_to(f, cardWhere.space3d); //设置位置和目标 f.transform.position = d.user.transform.position; f.target = data[this].targetcard; return(true); }
public void AddTriggered(CardTxt eL, step_target data) { if (!OnGoing) { Debug.Log("error unGoing triggered"); return; } //报错 //Debug.Log("gettrigged"); step.Add(eL, data); if (the_geter == null) { the_geter = new Queue <CardTxt>(); todoL.Push(the_geter); } the_geter.Enqueue(eL); }
public override step_target test() { if (!lastenter) { return(null); } step_target n = new step_target(); n.user = mini(); n.targretposs = transform.position; n.targetcard = lastenter; //print(n); lastenter = null; return(n); }
public override bool Get(Call_ c) { if (c.movecall == null) { return(false); } step_target data = test(); data = ToDocard.test(data); if (data != null) { askHostDo(data, false); return(true); } return(false); }
public override bool Do_order(order d) { step_target data = test(d); if (data == null) { return(false); } if (data.user.deconposs) { host().CopyDo_cardTxt(data.user.deconposs, data, true, host()); } else { askHostDo(data, true); } return(true); }
public void doCard(CardTxt c, step_target data, Host host) { h = host; if (!OnGoing) { OnGoing = true; } else { Debug.Log("ongoing_error"); return; } //需要报错// step = new Dictionary <CardTxt, step_target>(); //-----------------------------------------------------------| step.Add(c, data); Queue <CardTxt> q = new Queue <CardTxt>(); q.Enqueue(c); todoL.Push(q);//加入技能 //-----------------------------------------------------------| doall(); OnGoing = false; }
public override step_target test(order o) { //使用卡牌的触发器 //检测牌的状态 if (o.usecard.state != cardWhere.hand) { return(null); } step_target s = new step_target(mini(), this, o); //检测触发器的范围 和使用次数; //是否拥有卡牌 if (o.usecard.use) { return(o.usecard.use.test(s)); } else { return(ToDocard.test(s)); } }
//public void askHostDo(step_target data, bool a) //{ // host().CopyDo_cardTxt(ToDocard, data, a); //} public override bool Do_order(order d) { //step_target data = test(d); //data = ToDocard.test(data); //if (data == null) return false; //askHostDo(data, true); //return true; //测试 step_target data = test(d); if (data == null) { return(false); } if (data.usecard.use) { host().CopyDo_cardTxt(data.usecard.use, data, true, host()); } else { host().CopyDo_cardTxt(ToDocard, data, true, host()); } return(true); }
public override bool run_and_Pop(Dictionary <CardTxt, step_target> data) { step_target d = data[this]; Card_m user = data[this].user; Card_m usecard = data[this].usecard; if (d.nextstep == 0) { //还要扣费 //call docall(user.host(), new Call_mini(usecard, usecard.ID, false, true)); d.nextstep = 1; return(false); } else if (d.nextstep == 1) { //召唤 user.player().TXT_move_card_to(usecard, cardWhere.space3d); usecard.transform.position = d.targretposs; //call docall(user.host(), new Call_mini(usecard, usecard.ID, true, true)); return(true); } return(true); }
//[Header("-------------------------TXT")] public virtual step_target test(step_target d) { return(d); }
public override step_target test(step_target d) { //这里 测试下面 的run所需要的数据是否齐全; return(d); }
public void askHostDo(step_target data, bool a) { host().CopyDo_cardTxt(ToDocard, data, a, host()); }
public override step_target test(step_target d) { return(d); }