Пример #1
0
 public EnemyObj_SkeletonArcher(PlayerObj target, PhysicsManager physicsManager,
                                ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemySkeletonArcherIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type         = 25;
     TintablePart = _objectList[0];
 }
Пример #2
0
        public PickResult SubmitPick(int userID, int playerID)
        {
            PickResult result = PickResult.Success;
            PlayerObj  player = null;

            lock (_DraftLock)
            {
                player = FindPlayer(playerID);
                if (player == null)
                {
                    result = PickResult.InvalidPlayer;
                }
                else if (!Settings.PositionMaxes.ContainsKey(player.Position))
                {
                    result = PickResult.InvalidPosition;
                }
                else
                {
                    List <PlayerObj> draftedPlayers = GetUsersDraftedPlayers(userID);
                    int posCount = draftedPlayers.Sum(x => x.Position == player.Position ? 1 : 0);
                    if (posCount >= Settings.PositionMaxes[player.Position])
                    {
                        result = PickResult.PositionMax;
                    }
                    else
                    {
                        PlayerObj pickedPlayer = FindPickedPlayer(playerID);
                        if (pickedPlayer != null)
                        {
                            result = PickResult.AlreadyPicked;
                        }
                        else
                        {
                            DraftMoveObj match = FindUserOnClock(userID);
                            if (match == null)
                            {
                                result = PickResult.NotTurn;
                            }
                            else
                            {
                                DraftMove move = new DraftMove()
                                {
                                    Pick     = match.Pick,
                                    Round    = match.Round,
                                    SeasonID = Settings.DraftSeasonID,
                                    PlayerID = playerID,
                                    Time     = DateTime.Now,
                                    MoveType = (int)DraftMoveType.Pick,
                                    UserID   = userID
                                };
                                db.DraftMoves.InsertOnSubmit(move);
                                db.SubmitChanges();
                            }
                        }
                    }
                }
            }

            return(result);
        }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
            if (hit.collider != null)
            {
                if (hit.collider.CompareTag("Player"))
                {
                    _nowObj = hit.collider.GetComponent <PlayerObj>();
                }
                else
                {
                    //Set move Player object to this point
                    if (_nowObj != null)
                    {
                        Vector2 goalPos = hit.point;
                        _goalObjCircle.transform.position = hit.point;
                        _nowObj.SetMovePos(goalPos);
                    }
                }
            }
        }

        if (_nowObj != null)
        {
            _playerObjCircle.transform.position = _nowObj.transform.position;
        }
    }
Пример #4
0
        private void LoadFrontCardStats(PlayerObj player)
        {
            m_frontTrait1.Visible = false;
            m_frontTrait2.Visible = false;
            var b = (byte)Game.PlayerStats.Traits.X;

            if (b != 0)
            {
                m_frontTrait1.Text    = TraitType.ToString(b) + ": " + TraitType.ProfileCardDescription(b);
                m_frontTrait1.Visible = true;
            }
            var b2 = (byte)Game.PlayerStats.Traits.Y;

            if (b2 != 0)
            {
                m_frontTrait2.Y = m_frontTrait1.Y;
                if (b != 0)
                {
                    m_frontTrait2.Y -= 20f;
                }
                m_frontTrait2.Text    = TraitType.ToString(b2) + ": " + TraitType.ProfileCardDescription(b2);
                m_frontTrait2.Visible = true;
            }
            m_playerName.Text  = Game.PlayerStats.PlayerName;
            m_playerStats.Text = (int)(player.Damage / 20f) + "/" + (int)(player.MaxHealth / 50f);
            m_levelClass.Text  = string.Concat("Lv. ", Game.PlayerStats.CurrentLevel, " - ",
                                               ClassType.ToString(Game.PlayerStats.Class, Game.PlayerStats.IsFemale));
            m_money.Text            = Game.PlayerStats.Gold.ToString();
            m_classDescription.Text = ClassType.ProfileCardDescription(Game.PlayerStats.Class);
        }
Пример #5
0
 public EnemyObj_Wall(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                      GameTypes.EnemyDifficulty difficulty)
     : base("EnemyGhostIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     CollisionTypeTag = 4;
     Type             = 18;
 }
Пример #6
0
    public void SetPlayerData(PlayerObj playerObj, ChampionObj championObj)
    {
        for (int i = 0; i < sellItemSlots.Count; i++)
        {
            if (playerObj.Items.ToList().Any(x => x.SlotNum == i))
            {
                sellItemSlots[i].gameObject.SetActive(true);
                CombatObj itemObj = playerObj.Items.ToList().First(x => x.SlotNum == i);
                sellItemSlots[i].SetData(CombatTable.Instance.GetCombatData(itemObj.Type).Sprite, network.GetItemTable(itemObj.Type).SellingPrice);
            }
            else
            {
                sellItemSlots[i].gameObject.SetActive(false);
            }
        }

        goldText.text = playerObj.Gold.ToString("F0") + "G";

        if (playerObj.Effects.Any(x => x.Type == CombatType.OnBase))
        {
            sellItemSlots.ForEach(x => x.SetButtonInteractable(true));
            buyButton.interactable = true;
        }
        else
        {
            sellItemSlots.ForEach(x => x.SetButtonInteractable(false));
            buyButton.interactable = false;
        }
    }
Пример #7
0
 public EnemyObj_Fireball(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                          GameTypes.EnemyDifficulty difficulty)
     : base("EnemyGhostIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type         = 8;
     TintablePart = _objectList[0];
 }
Пример #8
0
 public EnemyObj_Horse(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                       GameTypes.EnemyDifficulty difficulty)
     : base("EnemyHorseRun_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type             = 10;
     m_fireShieldList = new List <ProjectileObj>();
 }
Пример #9
0
 public EnemyObj_BouncySpike(PlayerObj target, PhysicsManager physicsManager,
                             ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyBouncySpike_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type        = 3;
     NonKillable = true;
 }
Пример #10
0
    public void UpdateMainPlayerPos()
    {
        PlayerObj mainPlayer = CoreEntry.gActorMgr.MainPlayer;

        if (mainPlayer == null)
        {
            return;
        }
        if (Application.platform == RuntimePlatform.WindowsPlayer ||
            Application.platform == RuntimePlatform.WindowsEditor
            )
        {
            if (Input.GetKey(KeyCode.W))
            {
                Vector3 currPos = CoreEntry.gActorMgr.MainPlayer.GetPosition();
                mainPlayer.MoveToDir(CoreEntry.gCameraMgr.MainCamera.transform.forward);
            }

            if (Input.GetKey(KeyCode.S))
            {
                mainPlayer.MoveToDir(-CoreEntry.gCameraMgr.MainCamera.transform.forward);
            }

            if (Input.GetKey(KeyCode.A))
            {
                mainPlayer.MoveToDir(-CoreEntry.gCameraMgr.MainCamera.transform.right);
            }

            if (Input.GetKey(KeyCode.D))
            {
                mainPlayer.MoveToDir(CoreEntry.gCameraMgr.MainCamera.transform.right);
            }
        }
    }
Пример #11
0
        public override ActionState Update()
        {
            //硬直结束再说
            if (m_StiffCount > 0)
            {
                m_StiffCount -= Time.deltaTime;
                if (m_StiffCount <= 0)
                {
                    m_StiffCount = 0;
                }
                return(ActionState.Running);
            }

            m_Actor = CoreEntry.gActorMgr.MainPlayer;
            if (m_Actor == null || m_Target == null)
            {
                return(ActionState.Stop);
            }
            if (m_Actor.IsDeath())
            {
                return(ActionState.Failed);
            }
            if (m_Target.IsDeath())
            {
                return(ActionState.Succeed);
            }

            TryAttack();
            return(ActionState.Running);
        }
Пример #12
0
        public void Update(GameTime gameTime, PlayerObj player)
        {
            var flag = false;

            if (Flip == SpriteEffects.None && player.X > X)
            {
                flag = true;
            }
            if (Flip != SpriteEffects.None && player.X < X)
            {
                flag = true;
            }
            if (player != null &&
                CollisionMath.Intersects(player.TerrainBounds,
                                         new Rectangle(Bounds.X - 50, Bounds.Y, Bounds.Width + 100, Bounds.Height)) && flag &&
                player.Flip != Flip && CanTalk)
            {
                m_talkIcon.Visible = true;
            }
            else
            {
                m_talkIcon.Visible = false;
            }
            if (Flip == SpriteEffects.None)
            {
                m_talkIcon.Position = new Vector2(Bounds.Left - m_talkIcon.AnchorX,
                                                  Bounds.Top - m_talkIcon.AnchorY + (float)Math.Sin(Game.TotalGameTime * 20f) * 2f);
                return;
            }
            m_talkIcon.Position = new Vector2(Bounds.Right + m_talkIcon.AnchorX,
                                              Bounds.Top - m_talkIcon.AnchorY + (float)Math.Sin(Game.TotalGameTime * 20f) * 2f);
        }
Пример #13
0
 public EnemyObj_BallAndChain(PlayerObj target, PhysicsManager physicsManager,
                              ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyFlailKnight_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     BallAndChain                     = new ProjectileObj("EnemyFlailKnightBall_Sprite");
     BallAndChain.IsWeighted          = false;
     BallAndChain.CollidesWithTerrain = false;
     BallAndChain.IgnoreBoundsCheck   = true;
     BallAndChain.OutlineWidth        = 2;
     BallAndChain2                    = (BallAndChain.Clone() as ProjectileObj);
     m_chain           = new SpriteObj("EnemyFlailKnightLink_Sprite");
     m_chainLinksList  = new List <Vector2>();
     m_chainLinks2List = new List <Vector2>();
     for (var i = 0; i < m_numChainLinks; i++)
     {
         m_chainLinksList.Add(default(Vector2));
     }
     for (var j = 0; j < m_numChainLinks / 2; j++)
     {
         m_chainLinks2List.Add(default(Vector2));
     }
     Type         = 1;
     TintablePart = _objectList[3];
     m_walkSound  = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2");
     m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2");
 }
Пример #14
0
    public void OnConnect(int device_id)
    {
        AirConsole.instance.SetActivePlayers();
        Debug.Log($"Device with ID of {device_id} has connected!");

        //PlayerObj playerToSet = playersData.FirstOrDefault<PlayerObj>(p => p.pID == playerID);



        PlayerObj newPlayerData = new PlayerObj
        {
            pID           = AirConsole.instance.ConvertDeviceIdToPlayerNumber(device_id),
            score         = 0,
            numOfChips    = 0,
            numOfAttaches = 0,
            playerName    = AirConsole.instance.GetNickname(device_id)
        };

        PlayerObj playerCopyCheck = playersData.FirstOrDefault(p => p.pID == newPlayerData.pID);

        if (playerCopyCheck == null)
        {
            onscreenLog.text = JsonUtility.ToJson(newPlayerData);
            playersData.Add(newPlayerData);
            MakePlayerVibrate((int)newPlayerData.pID);
            UpdateOnscreenPlayerInfo();
        }
        else
        {
            onscreenLog.text = $"Welcome back Player {newPlayerData.pID}!";
        }
    }
Пример #15
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            PlayerObj player = other.GetComponent <PlayerObj>();

            switch (type)
            {
            case E_PropType.Atk:
                player.atk += changeValue;
                break;

            case E_PropType.MoveSpeed:
                player.moveSpeed += changeValue * 5;
                break;

            case E_PropType.MaxHP:
                player.maxHP += changeValue * 10;
                break;

            case E_PropType.HP:
                player.hp += changeValue * 5;
                if (player.hp > player.maxHP)
                {
                    player.hp = player.maxHP;
                }
                break;
            }

            GameObject propEff = Instantiate(getEff, this.transform.position, this.transform.rotation);
            Destroy(this.gameObject);
        }
    }
Пример #16
0
        private static void InitPlayerWithDefaultLocation()
        {
            var map = Map.LoadOrGet(0);

            PlayerObj.Init(2, 29, map);
            CameraObj.Init();
        }
Пример #17
0
    // Update is called once per frame
    void Update()
    {
        if (!isLocalPlayer)
        {
            return;
        }
        else
        {
            GameObject[] players = GameObject.FindGameObjectsWithTag("Player");
            foreach (GameObject PlayerObj in players)
            {
                if (PlayerObj.name == transform.name)
                {
                    return;
                }
                else
                {
                    otherHeadSetButtonPress = PlayerObj.GetComponent <ButtonPressed>().PlayerPressed;
                }
            }
        }

        if (!otherHeadSetButtonPress)
        {
            transform.localScale = OriSize;
        }
        else
        {
            transform.localScale = OriSize * 2f;
        }
    }
Пример #18
0
 public override void OnEnter()
 {
     m_cameraPos = new Vector2(Camera.X, Camera.Y);
     if (m_player == null)
     {
         m_player = (ScreenManager as RCScreenManager).Player;
     }
     m_titlePlate.Scale   = Vector2.Zero;
     m_title.Scale        = Vector2.Zero;
     m_title.Opacity      = 1f;
     m_titlePlate.Opacity = 1f;
     m_storedMusicVolume  = SoundManager.GlobalMusicVolume;
     m_songName           = SoundManager.GetCurrentMusicName();
     Tween.To(typeof(SoundManager), 1f, Tween.EaseNone, "GlobalMusicVolume",
              (m_storedMusicVolume * 0.1f).ToString());
     SoundManager.PlaySound("Player_Death_FadeToBlack");
     m_player.Visible    = true;
     m_player.Opacity    = 1f;
     m_spotlight.Opacity = 0f;
     Tween.To(this, 0.5f, Linear.EaseNone, "BackBufferOpacity", "1");
     Tween.To(m_spotlight, 0.1f, Linear.EaseNone, "delay", "1", "Opacity", "1");
     Tween.AddEndHandlerToLastTween(typeof(SoundManager), "PlaySound", "Player_Death_Spotlight");
     Tween.To(Camera, 1f, Quad.EaseInOut, "X", m_player.AbsX.ToString(), "Y",
              (m_player.Bounds.Bottom - 10).ToString(), "Zoom", "1");
     Tween.RunFunction(2f, this, "PlayerLevelUpAnimation");
     base.OnEnter();
 }
Пример #19
0
 public override void Reset()
 {
     LogMgr.LogAI("AutoAIAttackTarget.Reset");
     m_Actor      = null;
     m_Target     = null;
     m_CurSkillID = 0;
     m_StiffCount = 0;
 }
Пример #20
0
 public EnemyObj_SwordKnight(PlayerObj target, PhysicsManager physicsManager,
                             ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemySwordKnightIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type         = 16;
     m_walkSound  = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2");
     m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2");
 }
Пример #21
0
 public EnemyObj_Mimic(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                       GameTypes.EnemyDifficulty difficulty)
     : base("EnemyMimicIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type         = 33;
     OutlineWidth = 0;
     m_closeSound = new FrameSoundObj(this, m_target, 1, "Chest_Snap");
 }
Пример #22
0
 public EnemyObj_FireWizard(PlayerObj target, PhysicsManager physicsManager,
                            ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyWizardIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type = 9;
     PlayAnimation();
     TintablePart = _objectList[0];
 }
Пример #23
0
    void Awake()
    {
        _originPos = transform.localPosition;
        _current   = this;

        _playerInfo             = new PlayerInfo("player", 30, 5, 5, 5, 0, 0);
        _playerInfo._levelPoint = 10;
    }
Пример #24
0
    private ButtonObjMove mButton;          //按钮方法

    //private int Type = 1;//0代表cube,1代表木头,2代表石头
    // Use this for initialization
    void Start()
    {
        player        = GameObject.FindGameObjectWithTag("Player").transform;
        moveObjButton = Resources.Load <ButtonObjMove>("Prefabs/UIElement-Button-MoveObj");
        playerOb      = player.GetComponent <PlayerObj>();//玩家脚本
        thisTransf    = this.transform;
        entered       = false;
    }
Пример #25
0
 public EnemyObj_Wolf(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                      GameTypes.EnemyDifficulty difficulty)
     : base("EnemyWargIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     Type = 19;
     m_startDelayCounter = m_startDelay;
     m_runFrameSound     = new FrameSoundObj(this, 1, "Wolf_Move01", "Wolf_Move02", "Wolf_Move03");
 }
Пример #26
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_player = null;
         m_level  = null;
         if (m_alphaMaskRT != null && !m_alphaMaskRT.IsDisposed)
         {
             m_alphaMaskRT.Dispose();
         }
         m_alphaMaskRT = null;
         if (m_mapScreenRT != null && !m_mapScreenRT.IsDisposed)
         {
             m_mapScreenRT.Dispose();
         }
         m_mapScreenRT = null;
         foreach (var current in m_roomSpriteList)
         {
             current.Dispose();
         }
         m_roomSpriteList.Clear();
         m_roomSpriteList = null;
         foreach (var current2 in m_doorSpriteList)
         {
             current2.Dispose();
         }
         m_doorSpriteList.Clear();
         m_doorSpriteList = null;
         foreach (var current3 in m_iconSpriteList)
         {
             current3.Dispose();
         }
         m_iconSpriteList.Clear();
         m_iconSpriteList = null;
         AddedRoomsList.Clear();
         AddedRoomsList = null;
         m_roomSpritePosList.Clear();
         m_roomSpritePosList = null;
         m_doorSpritePosList.Clear();
         m_doorSpritePosList = null;
         m_iconSpritePosList.Clear();
         m_iconSpritePosList = null;
         m_playerSprite.Dispose();
         m_playerSprite = null;
         foreach (var current4 in m_teleporterList)
         {
             current4.Dispose();
         }
         m_teleporterList.Clear();
         m_teleporterList = null;
         m_teleporterPosList.Clear();
         m_teleporterPosList = null;
         m_xOffsetTween      = null;
         m_yOffsetTween      = null;
         base.Dispose();
     }
 }
Пример #27
0
 void TriggerDialog(PlayerObj playerObj)
 {
     dialogTips.active = true;
     playerObj.friendlyNPCList.Add(this);
     if (playerObj == null)
     {
         Debug.Log("a");
     }
 }
Пример #28
0
 public EnemyObj_Knight(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                        GameTypes.EnemyDifficulty difficulty)
     : base("EnemySpearKnightIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     TintablePart = _objectList[1];
     Type         = 12;
     m_walkSound  = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2");
     m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2");
 }
Пример #29
0
 public EnemyObj_Fairy(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo,
                       GameTypes.EnemyDifficulty difficulty)
     : base("EnemyFairyGhostIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     PlayAnimation();
     MainFairy    = true;
     TintablePart = _objectList[0];
     Type         = 7;
 }
Пример #30
0
    public void AddBuff(PlayerObj p, int id)
    {
        if (!buffs.Contains(id))
        {
            buffs.Add(id);
        }

        p.AddBuff(BuffIdToPath[id]);
    }
Пример #31
0
	public void placeChar(PlayerObj playerChar) {
		if (validPlaceTile ()) {
			turnsLeft--;
			board [selectedTileX, selectedTileY].addCharacter (playerChar);
			playerChar.scaleChar (.8f);
			playerChar.moveChar (new Vector2(selectedTileX, selectedTileY));
			if (turnsLeft == 0)
				phase = "combat";
			nextTurn ();
		}
	}
Пример #32
0
	public void addCharacter(PlayerObj charToAdd){
		charOccupy = charToAdd;
		charOccupy.pos = position;
		occupied = true;
	}
Пример #33
0
	void AddCharacterPlayer2() {
		if (player2customCharNum < player2char.Length) {
			player2char [player2customCharNum] = new PlayerObj (4, player2custom.atk, player2custom.def, player2custom.mag, player2custom.rng, player2custom.mv);
			player2char [player2customCharNum].addStandAndModel (player2custom.standObj, player2custom.modelObj, player2charStandWorldPos [player2customCharNum], player2charModelWorldPos [player2customCharNum]);
			player2char [player2customCharNum].playerOwner = "player2";
			player2customCharNum++;
		} else {
			player2custom.enabled = false;
			changeStatDisplay ();
			tileButtons.SetActive (true);
			player2DisplayStats.HpDisplay.SetActive (true);
			phase = "placement";
		}
	}
Пример #34
0
	public void moveChar(Vector2 space, PlayerObj charToMove){
		Tile spaceToMove = board [(int) space.x, (int) space.y];
		if (moveIsValid(space, charToMove)) {
			spaceToMove.occupied = true;
			spaceToMove.charOccupy = charToMove;
			board [(int) charToMove.pos.x, (int) charToMove.pos.y].occupied = false;

		}
	}
Пример #35
0
	public bool moveIsValid(Vector2 space, PlayerObj charToMove) {

		int charX = (int)charToMove.pos.x;
		int charY = (int)charToMove.pos.y;
		int moveX = (int)space.x;
		int moveY = (int)space.y;
		Tile spaceToMove = board [moveX, moveY];

		if (spaceToMove.occupied)
			return false;
		if ((Mathf.Abs (moveX - charX) + Mathf.Abs (moveY - charY)) > charToMove.move)
			return false;
		return true;
	}
Пример #36
0
	public bool targetValid(Vector2 targetPos, PlayerObj playerChar, string attackType) {
		if (attackType == "magic" && playerChar.range < (int)(Mathf.Abs (targetPos.x - playerChar.pos.x) + Mathf.Abs (targetPos.y - playerChar.pos.x)))
			return false;
		else if (!board [(int)targetPos.x, (int)targetPos.y].occupied)
			return false;
		else if (board [(int)targetPos.x, (int)targetPos.y].charOccupy.playerOwner == playerChar.playerOwner)
			return false;
		else
			return true;
	}
Пример #37
0
	public void attack(Vector2 targetPos, PlayerObj playerChar) {
		if (((int)Mathf.Abs (playerChar.pos.x - targetPos.x) + (int)Mathf.Abs (playerChar.pos.y - targetPos.y)) > 1) {
			if (targetValid (targetPos, playerChar, "magic")) {
				board [(int)targetPos.x, (int)targetPos.y].target (playerChar.magic, "magic");
				nextTurn ();
			}
		} else {
			if (targetValid (targetPos, playerChar, "physical")) {
				board [(int)targetPos.x, (int)targetPos.y].target (playerChar.attack, "physical");
				action = "move";
				nextTurn ();
			}
		}
	}