Exemplo n.º 1
0
    //private bool withShield = true;

    // Use this for initialization
    void Start() {
        anim = GetComponent<Animator>();
        attacker = GetComponent<Attacker>();
        health = GetComponent<Health>();
        originalSpeed = attacker.currentSpeed;
        anim.SetBool("withShield", true);
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     audioSource = GetComponent<AudioSource>();
     audioSource.volume = PlayerPrefsManager.GetMasterVolume();
     anim = GetComponent<Animator>();
     attacker = GetComponent<Attacker>();
 }
Exemplo n.º 3
0
 public ViewModel(Attacker attacker, DamageDistribution damageDistribution)
 {
     _damageDistribution = damageDistribution;
       _assignments = new BlockerDamageAssignments(attacker);
       _attacker = attacker;
       _totalDamageToAssign = attacker.Card.CalculateCombatDamageAmount();
       _damageLeftToAssign = _totalDamageToAssign;
 }
Exemplo n.º 4
0
	// Use this for initialization
	void Start () {
		anim = GetComponent<Animator>();
		attacker = GetComponent<Attacker>();
		audioSource = GetComponent<AudioSource>();
		if(!audioSource) {
			audioSource = gameObject.AddComponent<AudioSource>();
		}
	}
Exemplo n.º 5
0
	public void SetTarget(Attackable target, Attacker owner)
	{
		Owner = owner;
		Target = target;
		rigid.AddForce(Direction.normalized * StartForce, ForceMode2D.Impulse);
		float rot_z = Mathf.Atan2(Direction.normalized.y, Direction.normalized.x) * Mathf.Rad2Deg;
		transform.rotation = Quaternion.Euler(0f, 0f, rot_z - 90);
	}
Exemplo n.º 6
0
 // Use this for initialization
 void Start() {
     if (GetComponent<Animator>()) {
         anim = GetComponent<Animator>();
     } else {
         anim = GetComponentInChildren<Animator>();
     }
     attacker = GetComponent<Attacker>();
 }
Exemplo n.º 7
0
	// Update is called once per frame
	void Update () {
        this.slider.value = Time.timeSinceLevelLoad / levelTimeSec;
        
        if (Time.timeSinceLevelLoad >= levelTimeSec && !endOfLevel) {
            attacker = FindObjectOfType<Attacker>();
            if (!attacker) {
                EndOfLevel();
            }           
        }
    }
Exemplo n.º 8
0
        public ViewModel(Attacker attacker, DamageAssignmentOrder assignmentOrder)
        {
            _attacker = attacker;

              _blockerAssignments =
            attacker.Blockers.Select(
              blocker => Bindable.Create<BlockerAssignment>(blocker)).ToList();

              _assignmentOrder = assignmentOrder;
        }
Exemplo n.º 9
0
 // Use this for initialization
 void Start() {
     if (GetComponent<Animator>()) {
         anim = GetComponent<Animator>();
     } else {
         anim = GetComponentInChildren<Animator>();
     }
     attacker = GetComponent<Attacker>();
     //originalSpeed = 0.3f;
     //attacker.SetSpeed(originalSpeed);
 }
Exemplo n.º 10
0
    public override void OnAttacked(Attacker attacker, float force)
    {
        if (!IsFlailing)
            FallOver();

        MyRgd.AddForceAtPosition(attacker.MyTr.forward * force, attacker.MyTr.position,
                                 ForceMode.Impulse);

        if (attacker.Faction != Factions.Player)
        {
            Instantiate<GameObject>(PunchParticlesPrefab).transform.position = attacker.MyTr.position;
        }
    }
Exemplo n.º 11
0
	protected override IEnumerator Die(Attacker attacker)
	{
		if (MinionInfo.Infos.Count > 0)
		{
			Minion[] minions = MinionInfo.Spawn(transform.position);
			KI_Owner owner = new GameObject().AddComponent<KI_Owner>();
			owner.CurrentTargetPosition = BodyCenter;
			for (int i = 0; i < minions.Length; i++)
			{
				owner.AddMinion(minions[i], true);
			}
			owner.SetCurrentAttacker(attacker);
		}

		for (int i = 0; i < Souls; i++)
		{
			ReleaseSouls(attacker.Owner);
			yield return new WaitForSeconds(0.1f);
		}
		yield return null;
		gameObject.Despawn();
	}
Exemplo n.º 12
0
 public AttackerDecorator(Attacker enemy)
 {
     this.decoratedAttacker = enemy;
 }
Exemplo n.º 13
0
 // Use this for initialization
 void Awake()
 {
     mover = this.GetComponent<Mover>();
     FSM = this.GetComponent<FiniteStateMachine>();
     attacker = this.GetComponent<Attacker>();
 }
Exemplo n.º 14
0
    private void Spawn(Attacker myAttacker)
    {
        Attacker newAttacker = Instantiate(myAttacker, transform.position, transform.rotation) as Attacker;

        newAttacker.transform.parent = transform;
    }
Exemplo n.º 15
0
 public abstract void OnAttacked(Attacker attacker, float force);
Exemplo n.º 16
0
 // Use this for initialization
 void Start()
 {
     animator = GetComponent <Animator>();
     attacker = GetComponent <Attacker>();
 }
Exemplo n.º 17
0
	public override float Damage(float amount, Attacker attacker)
	{
		float damageDone = base.Damage(amount, attacker);
		damaged += damageDone;

		if (BricksToLose.Count > 0)
		{
			int count = (int)(damaged / DamagePerBrick);
			for (int i = 0; i < count; i++)
			{
				if (BricksToLose.Count == 0)
					break;
				if (BricksToLose[BricksToLose.Keys[0]].Count == 0)
				{
					BricksToLose.RemoveAt(0);
					i--;
					continue;
				}
				brick = BricksToLose[BricksToLose.Keys[0]].RandomEntry(BrickWeight);
				if (brick == null)
				{
					i--;
					continue;
				}
				brick.Losen();
				BricksToLose[BricksToLose.Keys[0]].Remove(brick);
			}

			damaged -= count * DamagePerBrick;
		}

		return damageDone;
	}
Exemplo n.º 18
0
 // Use this for initialization
 void Start()
 {
     foxAnimator    = GetComponent <Animator>();
     parentAttacker = GetComponentInParent <Attacker>();
 }
Exemplo n.º 19
0
 private void Awake()
 {
     attacker = GetComponent <Attacker>();
     animator = GetComponentInChildren <Animator>();
 }
Exemplo n.º 20
0
    private void SpawnAttacker()
    {
        Attacker newAttacker = Instantiate(RandomSpawn(), transform.position, transform.rotation) as Attacker;

        newAttacker.transform.parent = transform;
    }
Exemplo n.º 21
0
 // Use this for initialization
 void Start()
 {
     // Obtain the animator and attacker scripts
     anim     = GetComponent <Animator>();
     attacker = GetComponent <Attacker>();
 }
Exemplo n.º 22
0
    void Start()
    {
        thisTransform = transform;
        fxPlayer = GetComponent<FXPlayer>();

        //GameObject spawnedBar = Instantiate(energyBarPrefab) as GameObject;
        //spawnedBar.transform.parent = transform;
        //spawnedBar.transform.localPosition = new Vector3(0,1f,0);
        //energyBar = spawnedBar.GetComponent<DisplayBar>();
        //energyBar.DisplayValue = energy;

        attacker = GetComponent<Attacker>();
        attacker.OnTargetLeaveRange += targetLeftRange;
        attacker.OnTargetInRange += targetInRange;
        attacker.OnTargetDeath += targetDied;
        //attacker.OnBeginAttacking += startedAttacking;
        attacker.OnActualAttack += attack;

        navigator = GetComponent<Navigator>();
        if(navigator != null)
        {
            navigator.OnWalking += walking;
            navigator.OnStartWalk += startWalking;
            navigator.OnStopWalk += stopWalking;
        }
        life = GetComponent<Life>();
        life.OnBeingAttacked += wasAttacked;

        //StartCoroutine(energyRegen());
        SubscribeToInputDelegates();
    }
Exemplo n.º 23
0
 // Use this for initialization
 void Start()
 {
     anim     = gameObject.GetComponent <Animator> ();
     attacker = gameObject.GetComponent <Attacker> ();
 }
 private void Awake()
 {
     attacker = GetComponent<Attacker>();
 }
Exemplo n.º 25
0
	public virtual void SetCurrentAttacker(Attacker attacker)
	{
		Target = attacker;
	}
Exemplo n.º 26
0
 void SpawnAttacker()
 {
     Attacker attackerPrefab = attackers[Random.Range(0, attackers.Length)];
     Attacker newAttacker    = Instantiate(attackerPrefab, transform.position, transform.rotation, transform);
 }
Exemplo n.º 27
0
 private void Spawn(Attacker attackerPrefab)
 {
     Attacker newAttacker = Instantiate(attackerPrefab, transform.position, transform.rotation) as Attacker;
     // Add the newly created attacker as a child to the object that created us
     newAttacker.transform.parent = transform;
 }
Exemplo n.º 28
0
    private void SpawnEnemy()
    {
        Attacker newAttacker = Instantiate(GetEnemy(), transform.position, transform.rotation) as Attacker;

        newAttacker.transform.parent = transform;
    }
Exemplo n.º 29
0
	public virtual void Heal(float amount, Attacker healer)
	{
		if (amount == 0)
			return;
		if (amount < 0)
		{
			Damage(-amount, healer);
			return;
		}
		Health = Mathf.Min(Health + amount, MaxHealth);
	}
Exemplo n.º 30
0
    private void Spawn(Attacker attackerPrefab)
    {
        Attacker newAttacker = Instantiate(attackerPrefab, gameObject.transform.position, Quaternion.identity) as Attacker;

        newAttacker.transform.parent = transform;
    }
Exemplo n.º 31
0
    private void Spawn(Attacker myAttacker)
    {
        Attacker newAttacker = Instantiate(myAttacker, transform.position, Quaternion.identity) as Attacker;

        newAttacker.transform.parent = transform; // spawns the attacker as a child of its spawner!
    }
Exemplo n.º 32
0
    // Update is called once per frame
    void Update()
    {
        if (phase == Phase.Connecting)
        {
            bool allConnected = true;
            for (int i = 0; i < nodes.Count; i++)
            {
                if (UniMoveController.GetNumConnected() > 0)
                {
                    if (nodes[i].controller == null)
                    {
                        UniMoveController controller = nodes[i].gameObject.AddComponent <UniMoveController>();
                        if (controller.Init(i))
                        {
                            controller.InitOrientation();
                            controller.ResetOrientation();
                            nodes[i].Init(controller, this.debugButtons[i]);
                        }
                        else
                        {
                            Destroy(controller);
                            allConnected = false;
                        }
                    }
                }
                else
                {
                    nodes[i].InitDebug(i <= 1?1:2, this.debugButtons[i]);
                }
            }

            if (allConnected)
            {
                for (int i = 0; i < nodes.Count; i++)
                {
                    if (nodes[i].type == 1)
                    {
                        Target target = nodes[i].gameObject.AddComponent <Target>();
                        target.HitEvent += OnTargetHit;
                        targets.Add(target);
                    }
                    else
                    {
                        Attacker attacker = nodes[i].gameObject.AddComponent <Attacker>();
                        attacker.HitEvent            += OnAttackerHit;
                        attacker.TimeoutEvent        += OnAttackerTimeout;
                        attacker.TimeoutWarningEvent += OnAttackerTimeoutWarning;
                        attackers.Add(attacker);
                    }
                }

                phase = Phase.Waiting;
            }
        }

        else if (phase == Phase.Waiting)
        {
            // start game
            if (Input.GetKeyDown(KeyCode.Space))
            {
                bool practice = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
                StartGame(practice);
            }
        }

        else if (phase == Phase.Playing)
        {
            // stop game
            if (Input.GetKeyDown(KeyCode.Space))
            {
                StopGame();
            }

            // heal
            if (Input.GetKeyDown(KeyCode.H))
            {
                Heal();
            }
        }

        else if (phase == Phase.Ended)
        {
        }

        if (Input.GetKeyDown(KeyCode.D))
        {
            //ControllerDebug.Active = !ControllerDebug.Active;
            debugPanel.SetActive(!debugPanel.activeSelf);
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            setupPanel.SetActive(!setupPanel.activeSelf);
        }
    }
Exemplo n.º 33
0
 void Start()
 {
     this._attacker = this.GetComponent <Attacker>();
 }
Exemplo n.º 34
0
 void OnAttackerTimeoutWarning(Attacker attacker)
 {
     voAudioSource.PlayOneShot(voCountdownWarning[voVariationIndex % voHit.Length]);
 }
Exemplo n.º 35
0
 protected override void DoSkill(IBattleUnit attackTarget, double timeDelta)
 {
     _poisonEffect.DamagePerSecond = Convert.ToInt64(Attacker.GetDamage() * DamagePerSecondKoef + BonusDamagePerSecond);
     attackTarget.EffectService.Add(_poisonEffect);
 }
Exemplo n.º 36
0
    public void Spawn(Attacker attackerPrefab)
    {
        Attacker newAttacker = Instantiate(attackerPrefab, transform.position, transform.rotation) as Attacker;

        newAttacker.transform.parent = transform;
    }
Exemplo n.º 37
0
 internal AttackCompletedEventArgs(Attacker attacker)
 {
     Attacker=attacker;
 }
Exemplo n.º 38
0
 public static Attacker GetRootAsAttacker(ByteBuffer _bb, Attacker obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }
Exemplo n.º 39
0
 public virtual OrderStatus Execute(Random Random)
 {
     Attacker.Fire(AttackTile, UseSecondaryWeapon);
     return(OrderStatus.FINISHED);
 }
Exemplo n.º 40
0
    private void Spawn(Attacker myAttacker)
    {
        Attacker newAttacker = Instantiate(myAttacker, transform.position, transform.rotation);

        newAttacker.transform.parent = transform; //This transform is now the parent of the newAttacker.
    }
Exemplo n.º 41
0
 internal AttackStartedEventArgs(Attacker attacker)
 {
     Attacker = attacker;
 }
Exemplo n.º 42
0
    public void SpawnAttacker()
    {
        Attacker newAttacker = Instantiate(attackerSpawn, transform.position, transform.rotation) as Attacker;

        newAttacker.transform.parent = transform;
    }
Exemplo n.º 43
0
 public override void OnAttacked(Attacker attacker, float force)
 {
     Vector3 awayFromHitter = (rigd.position - attacker.MyTr.position).normalized;
     rigd.velocity += force * ForceMultiplier * awayFromHitter;
 }
Exemplo n.º 44
0
 public static Attacker GetRootAsAttacker(ByteBuffer _bb, Attacker obj)
 {
     FlatBufferConstants.FLATBUFFERS_1_11_1(); return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }
 public BlockerJoinedCombatEvent(Blocker blocker, Attacker attacker)
 {
     Blocker = blocker;
     Attacker = attacker;
 }
Exemplo n.º 46
0
 // Start is called before the first frame update
 void Start()
 {
     attacker = GetComponentInParent <Attacker>();
 }
Exemplo n.º 47
0
	//called by attacker to apply attackInfo when a unit is attacked and hit
	public AttackInstance ApplyHitEffect(AttackInstance attInstance){
		//HitResult hitResult=
		ApplyDamage(attInstance);
		
		if(attInstance.missed) audioTB.PlayMissed();
		else{
			audioTB.PlayHit();
			animationTB.PlayHit();
		}
		
		
		if(!ContainedInAttackerList(attInstance.srcUnit)){
			Attacker attacker=new Attacker(attInstance.srcUnit);
			attackerList.Add(attacker);
		}
		
		triggered=true;
		
		//perform counter attack if possible
		//if the rule allows it
		if(attInstance.type==_AttackType.Range_Normal || attInstance.type==_AttackType.Melee_Normal){
			if(GameControlTB.IsCounterAttackEnabled()){
				//if the target is still not destroyed and have a counter attack move remain
				if(!attInstance.destroyed && counterAttackRemain>0){
					//if the attacker is within attack distance
					float dist=AStar.Distance(occupiedTile, attInstance.srcUnit.occupiedTile);
					if(dist>=GetAttackRangeMin() && dist<=GetAttackRangeMax()){
						attInstance.counterAttacking=true;
						StartCoroutine(CounterAttackRoutine(attInstance.srcUnit));
					}
				}
			}
		}
		
		return attInstance;
	}
Exemplo n.º 48
0
 private static bool IsPlayer(Attacker arg)
 {
     return(arg.CharacterID != 0);
 }
Exemplo n.º 49
0
 // Use this for initialization
 void Start()
 {
     attacker = GetComponent<Attacker>();
 }
 public AttackerJoinedCombatEvent(Attacker attacker, bool wasDeclared)
 {
     Attacker = attacker;
       WasDeclared = wasDeclared;
 }
Exemplo n.º 51
0
	public virtual float Damage(float amount, Attacker attacker)
	{
		if (amount == 0)
			return 0f;
		if (amount < 0)
		{
			Heal(-amount, attacker);
			return 0f;
		}
		float before = Health;
		Health = Mathf.Max(Health - amount, 0f);

		if (Health == 0f)
		{
			StartCoroutine(Die(attacker));
		}
		return before - Health;
	}
Exemplo n.º 52
0
 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator> ();
     attacker = GetComponent<Attacker> ();
     DetectDifficulty ();
 }
Exemplo n.º 53
0
	protected virtual IEnumerator Die(Attacker attacker)
	{
		yield return null;
		if (ReleaseSoulWhenDead)
			ReleaseSouls(attacker.Owner);
		Despawn();
	}
Exemplo n.º 54
0
 private void Start()
 {
     ANIMSTATE = ANIM_STATE.IDLE;
     animator  = GetComponent <Animator>();
     attacker  = GetComponent <Attacker>();
 }
Exemplo n.º 55
0
 private static bool IsGateCampShip(Attacker attacker)
 {
     return(Types.IsGateCampShip(attacker.ShipTypeID, attacker.WeaponTypeID));
 }
Exemplo n.º 56
0
 public FreezingAttacker(Attacker decoratedAttacker) : base(decoratedAttacker)
 {
 }
Exemplo n.º 57
0
    void Start()
    {
        thisTransform = transform;
        startPosition = thisTransform.position;
        attacker = GetComponent<Attacker>();
        attacker.OnTargetLeaveRange += targetLeftRange;
        attacker.OnTargetInRange += targetInRange;
        attacker.OnTargetDeath += targetDied;
        attacker.OnBeginAttacking += startedAttacking;
        attacker.OnActualAttack += attack;

        navigator = GetComponent<Navigator>();
        navigator.OnWalking += walking;
        navigator.OnStartWalk += startWalking;
        navigator.OnStopWalk += stopWalking;

        life = GetComponent<Life>();
        life.OnBeingAttacked += wasAttacked;
        StartCoroutine("prowl");
        //StartCoroutine(repeatHurt());

        lineOfSight = (Instantiate(lineOfSightPrefab) as GameObject).GetComponent<LineRenderer>();
        lineOfSight.gameObject.SetActiveRecursively(false);
    }
Exemplo n.º 58
0
 // Start is called before the first frame update
 void Start()
 {
     attacker = transform.parent.GetComponent <Attacker>();
 }
Exemplo n.º 59
0
 // Use this for initialization
 void Start()
 {
     foxAnimator = GetComponent<Animator>();
     attacker = GetComponent<Attacker>();
 }
Exemplo n.º 60
0
    public static Skillbase CreateSKill(Skill skill, Attacker owner)
    {
        Skillbase sk = new Skillbase(skill, owner);

        switch (skill)
        {
        case Skill.Strong:
            sk.Name = skill.ToString();
            sk.Cost = 30;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxHp, value = 100f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxHpRatio, value = 0.2f
            });
            sk.Time      = 30f;
            sk.CoolDown  = 45f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Elements_Life";
            sk.iconColor = Color.green;
            break;

        case Skill.Wise:
            sk.Name = skill.ToString();
            sk.Cost = 30;

            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxMp, value = 100f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxMpRatio, value = 0.2f
            });
            sk.Time      = 30f;
            sk.CoolDown  = 45f;
            sk.SkillType = SkillType.Self;

            sk.icon      = "32px/Weapons_Staff";
            sk.iconColor = Color.blue;
            break;

        case Skill.Power:
            sk.Name = skill.ToString();
            sk.Cost = 25;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.AtkRatio, value = 0.25f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Weapons_Sword";
            sk.iconColor = Color.white;
            break;

        case Skill.Protect:
            sk.Name = skill.ToString();
            sk.Cost = 25;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Def, value = 10f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Equipment_Shield";
            sk.iconColor = Color.white;
            break;

        case Skill.Agile:
            sk.Name = skill.ToString();
            sk.Cost = 25;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.SpdRatio, value = 0.1f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Equipment_Boots";
            sk.iconColor = Color.blue;
            break;

        case Skill.Bless:
            sk.Name = skill.ToString();
            sk.Cost = 25;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.LukRatio, value = 0.2f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Rewards_Star";
            sk.iconColor = Color.yellow;
            break;

        case Skill.Touch:
            sk.Name = skill.ToString();
            sk.Cost = 25;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MdRatio, value = 0.2f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Elements_Ground";
            sk.iconColor = Color.yellow;
            break;

        case Skill.Smash:
            sk.Name   = skill.ToString();
            sk.Cost   = 15;
            sk.Damage = 350;
            sk.targetBuff.Add(new buff()
            {
                attr = AttrType.Def, value = -50f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Atk, value = 50f
            });
            sk.Time      = 10f;
            sk.CoolDown  = 20f;
            sk.SkillType = SkillType.Both;
            sk.icon      = "32px/Tools_Hammer";
            sk.iconColor = Color.red;
            break;

        case Skill.IceImpact:
            sk.Name   = skill.ToString();
            sk.Cost   = 15;
            sk.Damage = 100;
            sk.targetBuff.Add(new buff()
            {
                attr = AttrType.SpdRatio, value = -0.5f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Target;
            sk.icon      = "32px/Elements_Ice";
            sk.iconColor = Color.blue;
            break;

        case Skill.Heal:
            sk.Name      = skill.ToString();
            sk.Cost      = 50;
            sk.Healing   = 250;
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Elements_Water";
            sk.iconColor = Color.blue;
            break;

        case Skill.HeroPower:
            sk.Name    = skill.ToString();
            sk.Cost    = 0;
            sk.Healing = 1500;
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxHp, value = 500
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxMp, value = 200
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Atk, value = 100
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Def, value = 100
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Luk, value = 30
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Md, value = 100
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.Spd, value = 50
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxHpRatio, value = .2f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.MaxMpRatio, value = .2f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.AtkRatio, value = .5f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.DefRatio, value = .5f
            });
            sk.selfBuff.Add(new buff()
            {
                attr = AttrType.SpdRatio, value = .2f
            });
            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Self;
            sk.icon      = "32px/Modifiers_LevelUp";
            sk.iconColor = Color.yellow;
            break;

        case Skill.PoisonAttack:
            sk.Name   = skill.ToString();
            sk.Cost   = 0;
            sk.Damage = 150;
            sk.targetBuff.Add(new buff()
            {
                attr = AttrType.Def, value = -1f, tickInterval = 3f
            });
            sk.targetBuff.Add(new buff()
            {
                attr = AttrType.CurHp, value = -50, tickInterval = 1f
            });
            sk.targetBuff.Add(new buff()
            {
                attr = AttrType.Atk, value = -2, tickInterval = 3f
            });
            sk.targetBuff.Add(new buff()
            {
                attr = AttrType.Spd, value = -2, tickInterval = 3f
            });

            sk.Time      = 15f;
            sk.CoolDown  = 30f;
            sk.SkillType = SkillType.Target;
            sk.icon      = "32px/Elements_Death";
            sk.iconColor = Color.green;
            break;

        default:
            break;
        }
        return(sk);
    }