public override void OnHitWeapon(BaseWeapon weapon, BaseCharacter attacker, DamageInfo dmg) { //Test to see if the person who just shot us is closer than our current target (usually the sandcastle) if (GameHandler.IsPlayer(attacker)) { if (Vector3.Distance(transform.position, attacker.transform.position) < Vector3.Distance(transform.position, currentIntent.targetPosition)) { //If the attacker is close, switch to him as the target and attack him/her currentIntent = new AIIntent() { owner = this, target = attacker, intent = Intent.Attack, intentAssignTime = Time.fixedTime }; } } base.OnHitWeapon(weapon, attacker, dmg); if (this.CurrentHealth <= 0) { if (GameHandler.IsPlayer(attacker)) { (attacker as PlayerController).RewardForKill(150, this); GameHandler.instance.spawnHandler.OnCrabDeath(); //GameObject g = ItemDrop[Random.Range(0, ItemDrop.Length)]; float r = Random.RandomRange(0.0f, 1.0f); if (r < dropProbabilty) { GameObject g = (GameObject)GameObject.Instantiate(ItemDrop[Random.Range(0, ItemDrop.Length)], transform.position, transform.rotation); g.rigidbody.AddForce(Vector3.up * 5, ForceMode.Impulse); } } } }
private void OnCharacterDied(BaseCharacter character) { if (character is BaseEnemyAI) { killCount++; enemyKillCount.text = "Enemies killed: " + killCount; } }
public virtual void DealDamage(BaseCharacter character) { character.TakeDamage (damage); if (this.tag == "Enemy") { Debug.Log (hp); } }
/// <summary> /// This method must be called whenever a character is about to die, in here, whoever needs to be notified of the character's death, will be /// </summary> /// <param name="character">Character.</param> public static void CharacterDied(BaseCharacter character) { //Put the selector back on the Selector transform if this guy was it's parent if (character.transform == instance.attackSelector.transform.parent) { instance.attackSelector.GetComponent<Selector>().GoBackToParent(); } Debug.Log (character); //Check if the mission was completed if (character is BaseEnemyAI && instance.missionType == MissionController.MissionType.Assault) { if (instance.missionController.UpdateMission ((BaseEnemyAI)character)) { instance.MissionOver (true); } } //check if the player is the character that died else if (character is BasePlayer) { gameRunning = false; instance.MissionOver(false); Debug.Log ("Mission failed"); } //Let, whoever needs to, know that a character has died if (onCharacterDiedE != null) onCharacterDiedE (character); }
public ShotState(BaseCharacter parent, YugiChargeSkillState parentState) : base(parent) { this.parent = parentState; frame = new FrameCounter(180); shotInterval = new FrameCounter(3); }
public void ApplyOnHitEffects(BaseCharacter HitCharacter) { if (IsOnHitEffect && OnHitEffect != null) { HitCharacter.MyStats.AddEffect (OnHitEffect); } if (DoesReviveOnHit) { HitCharacter.Ressurect (transform.position); // if no respawn point - should check here with game manager if theres a respawn zone } }
public void Awake() { _myTransform = transform; _controller = GetComponent<CharacterController>(); _state = AdvancedMovement.State.Init; pc = GetComponent<BaseCharacter>(); _dead = false; }
public EnemyAI(EnemyModel enemy, PlayerModel player) { this.enemy = enemy; this.player = player; nextMove = 3.0f; // make depending on type of enemy }
/// <summary> /// Constructor. /// </summary> /// <param name="character"></param> /// <param name="entries"></param> /// <param name="sort"></param> /// <param name="reverseOrder"></param> /// <param name="groupByPriority"></param> internal PlanSorter(BaseCharacter character, IEnumerable<PlanEntry> entries, PlanEntrySort sort, bool reverseOrder, bool groupByPriority) { m_sort = sort; m_entries = entries; m_reverseOrder = reverseOrder; m_groupByPriority = groupByPriority; m_character = character; }
public void Awake() { user = GetComponent<BaseCharacter>(); //construct ability classes charMovement.Setup (user); charStatus.Setup (user); charEquipment.Setup (); }
public void Awake() { _myTransform = transform; _controller = GetComponent<CharacterController>(); _state = AdvancedMovement.State.Init; _bc = gameObject.GetComponent<BaseCharacter>(); }
public override void SetScaling(BaseCharacter user) { Debug.Log ("Scaling is Set"); _user = user; baseScalingStat.SetScaling (user); regenScalingStat.SetScaling (user); user.StartCoroutine (StartRegen()); CurValue = MaxValue; }
/// <summary> /// Constructor for use in code when optimizing remapping. /// </summary> /// <param name="character">Character information</param> /// <param name="plan">Plan to optimize for</param> /// <param name="strategy">Optimization strategy</param> /// <param name="name">Title of this form</param> /// <param name="description">Description of the optimization operation</param> public AttributesOptimizationForm(Character character, BasePlan plan, Strategy strategy, string name, string description) : this() { m_character = character; m_baseCharacter = character.After(plan.ChosenImplantSet); m_strategy = strategy; m_plan = plan; m_description = description; Text = name; }
private void ShowDamage(BaseCharacter target, int damage) { TextMesh textmesh = ((GameObject)Instantiate(dmgNumbers, target.transform.position + new Vector3(0f, 0.5f, -3f), Quaternion.identity)).GetComponent<TextMesh>(); textmesh.text = damage.ToString(); if (target.tag != "Player") textmesh.color = Color.white; else textmesh.color = Color.red; }
public void UpdateCharacter(BaseCharacter NewCharacter) { MyPlayer = NewCharacter; MyOriginalPlayer = NewCharacter; if (IsTargetOfPlayer && MyOriginalPlayer) { if (MyOriginalPlayer.SelectedPlayer) { MyPlayer = MyOriginalPlayer.SelectedPlayer.GetComponent<BaseCharacter>(); } else { MyPlayer = null; } } }
/// <summary> /// Constructor /// </summary> public EFTLoadoutImportationForm(Plan plan) { InitializeComponent(); topSplitContainer.RememberDistanceKey = "EFTLoadoutImportationForm"; m_plan = plan; m_character = m_plan.Character; EveClient.CharacterChanged += EveClient_CharacterChanged; EveClient.PlanChanged += EveClient_PlanChanged; }
/// <summary> /// Constructor for use in code when the user wants to manually edit a remapping point. /// </summary> /// <param name="character">Character information</param> /// <param name="plan">Plan to optimize for</param> /// <param name="strategy">Optimization strategy</param> /// <param name="name">Title of this form</param> /// <param name="description">Description of the optimization operation</param> public AttributesOptimizationForm(Character character, Plan plan, RemappingPoint point) : this() { m_plan = plan; m_character = character; m_baseCharacter = character.After(plan.ChosenImplantSet); m_manuallyEditedRemappingPoint = point; m_strategy = Strategy.ManualRemappingPointEdition; m_description = "Manual editing of a remapping point"; Text = "Remapping point manual editing (" + plan.Name + ")"; }
public void SetFirstPersonCamera(bool on) { if(_playerBC == null) _playerBC = GameSettings.Instance.player.GetComponent<BaseCharacter>(); if(on){ camTransform = camera1stPerson; _playerBC.ActivateCharModel(false); } else { camTransform = camera3rdPerson; _playerBC.ActivateCharModel(true); } }
/// <summary> /// Initializes a new instance of the <see cref="AttributesOptimizerWindow"/> class. /// Constructor used in WindowsFactory. /// </summary> /// <param name="planEditorControl">The plan editor control.</param> /// <param name="strategy">Optimization strategy</param> /// <exception cref="System.ArgumentNullException">planEditorControl</exception> public AttributesOptimizerWindow(PlanEditorControl planEditorControl, AttributeOptimizationStrategy strategy) : this() { planEditorControl.ThrowIfNull(nameof(planEditorControl)); m_planEditor = planEditorControl; m_plan = planEditorControl.Plan; m_character = (Character)m_plan.Character; m_baseCharacter = m_character.After(m_plan.ChosenImplantSet); m_strategy = strategy; // Update title and description UpdateTitle(); }
public GameObject SpawnCamera(BaseCharacter LocalPlayer) { //BaseCharacter LocalPlayer = GetManager.GetCharacterManager ().GetLocalPlayer (); //NetworkView MyNetworkView = LocalPlayer.gameObject.GetComponent <NetworkView>(); // bool IsConnected = GetManager.GetNetworkManager ().IsConnected (); //if (!IsConnected || (IsConnected && MyNetworkView.isMine)) { GameObject MyCameraObject = (GameObject)Instantiate (CameraPrefab, LocalPlayer.gameObject.transform.position, Quaternion.identity); Camera MyCamera = MyCameraObject.GetComponent <Camera> (); MyCamera.gameObject.transform.parent = LocalPlayer.gameObject.transform; MyCamera.gameObject.transform.localPosition = new Vector3 (MyCamera.gameObject.transform.localPosition.x, MyCamera.gameObject.transform.localPosition.y, MyCamera.gameObject.transform.localPosition.z) + CameraHotSpot; return MyCameraObject; } }
public AINavigation(AIInput input) { _user = input.User; _tr = _user.transform; // _seeker = _tr.gameObject.AddComponent<Seeker> (); // _seeker.pathCallback += OnPathComplete; GameObject go = GameObject.FindGameObjectWithTag("Player"); if(go == null) Debug.LogError("Could not find the player"); target = go.transform; // _user.StartCoroutine (RepeatTrySearchPath ()); }
public void Hit(BaseCharacter target, BaseCharacter origin) { target._currentHP -= origin._physicalBaseAttack; if (target._currentHP <= 0) { target._currentHP = 0; if (target.tag == "Enemy") { Destroy(target.gameObject, 0.5f); //BattleList.Remove(target.gameObject); } } //ShowDamage(target, origin.Strength); }
// Update is called once per frame void Update () { Screen.lockCursor = IsLockedCursor; if (MyCharacter == null) { MyCharacter = GetManager.GetCharacterManager ().GetLocalPlayer (); if (MyCharacter) ResetCamera (); } else { //MyCamera.transform.eulerAngles = new Vector3 (45, 45, 0); UpdateCamera (); if (MyCameraMode == CameraMode.TopDown) { if (Input.GetKeyDown (KeyCode.Space)) { CentreToCharacter (); } } } }
private void InitBattleUnitAttributes() { battleUnit = new BaseCharacter(); int attributesCount = Enum.GetValues(typeof(AttributeName)).Length; int[] attributes = new int[attributesCount]; //Randomly Generate Attributes for (int i = 0; i < TOTAL_ATTRIBUTES; i++) { attributes[UnityEngine.Random.Range(0, attributesCount)]++; } //Set Attributes to Character for (int i = 0; i < attributesCount; i++) { battleUnit.GetAttribute(i).Add(attributes[i]); } }
public void savePlayer() { BasePlayer player = new BasePlayer (); player.playerName = this.playerNameInput.text; player.playerType = this.currentPlayerType; BaseCharacter character = new BaseCharacter (); switch (this.currentPlayerType) { case PlayerType.MELEE: character = this.baseWarrior; break; case PlayerType.DISTANCE: character = this.baseArcher; break; case PlayerType.MAGIC: character = this.baseMage; break; } player.playerStats = new PlayerStats(); player.playerStats.maxHealth = character.maxHealth; player.playerStats.health = character.maxHealth; player.playerStats.strength = character.strength; player.playerStats.damageReduction = character.damageReduction; player.playerStats.initSkillLevel (this.currentPlayerType); player.positionX = warrior.transform.position.x; player.positionY = warrior.transform.position.y; player.positionZ = warrior.transform.position.z; player.rotationX = warrior.transform.rotation.eulerAngles.x; player.rotationY = warrior.transform.rotation.eulerAngles.y; player.rotationZ = warrior.transform.rotation.eulerAngles.z; GameConstants.newGame = true; DataManager dataManager = new DataManager (); dataManager.saveToFile<BasePlayer> (player, GameConstants.saveFileName); NavigationManager navigationManager = GetComponent<NavigationManager> (); navigationManager.LoadScene (GameConstants.sceneGame); }
public override void OnHitWeapon(BaseWeapon weapon, BaseCharacter attacker, DamageInfo dmg) { //Test to see if the person who just shot us is closer than our current target (usually the sandcastle) if (GameHandler.IsPlayer(attacker)) { hitCount++; lastHitTime = Time.time; if (hitCount > 5) { GameObject g = new GameObject("AITarget"); g.transform.position = new Vector3(gameObject.transform.position.x + Random.Range(-20, 20), 0, gameObject.transform.position.z + Random.Range(-20, 20)); AINullTarget target = g.AddComponent<AINullTarget>(); currentIntent = new AIIntent() { intent = Intent.Flee, owner = this, intentAssignTime = Time.fixedTime, target = target }; } /*if (attacker != currentIntent.target) { if (Vector3.Distance(transform.position, attacker.transform.position) < Vector3.Distance(transform.position, currentIntent.targetPosition)) { //If the attacker is close, switch to him as the target and attack him/her currentIntent = new AIIntent() { owner = this, target = attacker, intent = Intent.Attack, intentAssignTime = Time.fixedTime }; } }*/ } base.OnHitWeapon(weapon, attacker, dmg); if (this.CurrentHealth <= 0) { if (GameHandler.IsPlayer(attacker)) { (attacker as PlayerController).RewardForKill(600, this); } } }
// Update is called once per frame void Update () { if (IsTargetOfPlayer && MyPlayer) { if (MyOriginalPlayer.SelectedPlayer == null) { MyPlayer = null; } } if (MyPlayer != null) { ShowGui(); if (!MyPlayer.IsAlive ()) { //MyGui.EndGame.SetActive (true); // this should be done from EndGame in GameManager } else { UpdateEffectsGui (); UpdateTexts (MyPlayer); // updates the player stats } } else { HideGui(); if (IsLocalPlayer) { UpdateCharacter(GetManager.GetCharacterManager().GetLocalPlayer()); } } }
public override void Update() { if (!stopwatch.IsRunning || stopwatch.ElapsedMilliseconds > 300) { stopwatch.Reset(); stopwatch.Start(); List<BaseCharacter> characters = PlayerManager.Instance.Party.ToList(); if (Input.GetButton("PS4_L2")) characters.Reverse(); if (Input.GetButton("PS4_L2") || Input.GetButton("PS4_R2")) { SoundManager.PlaySoundEffect(SoundEffects.Cursor); CharacterInfo = characters.SkipWhile(c => c.Name != CharacterInfo.Name).Skip(1).FirstOrDefault(); if (CharacterInfo == null) CharacterInfo = characters.First(); } else stopwatch.Stop(); } base.Update(); }
/// <summary> /// Constructor. /// </summary> /// <param name="character"></param> public PlanScratchpad(BaseCharacter character) : base(character) { }
public CharacterEventInfoClass(BaseCharacter _character, int _deaths) { character = _character; deaths = _deaths; SetupOtherStuff(); }
// Use this for initialization void Start() { background = GetComponentsInChildren <Image>()[0] as Image; foreground = GetComponentsInChildren <Image>()[1] as Image; character = GetComponentInParent <BaseCharacter>(); }
public CharacterEventInfoClass(BaseCharacter _character) { character = _character; SetupOtherStuff(); }
public abstract void Apply(BaseCharacter attacker, BaseCharacter target, int damageDealt, Attack attack);
protected void lvlupProc(BaseCharacter hero) { //refactor into an array loop // Order is HP, Stam, Mana, Str, Int, Dex, Speed, Luck, Def, Resist, Will int rng = rand.Next(101); if (rng < hero.GrowthHP) { hero.MaxHP++; } rng = rand.Next(101); if (rng < hero.GrowthMP) { hero.MaxMP++; } rng = rand.Next(101); if (rng < hero.GrowthSP) { hero.MaxSP++; } rng = rand.Next(101); if (rng < hero.GrowthStr) { hero.Str++; } rng = rand.Next(101); if (rng < hero.GrowthInt) { hero.Int++; } rng = rand.Next(101); if (rng < hero.GrowthDex) { hero.Dex++; } rng = rand.Next(101); if (rng < hero.GrowthSpeed) { hero.Speed++; } rng = rand.Next(101); if (rng < hero.GrowthLuck) { hero.Luck++; } rng = rand.Next(101); if (rng < hero.GrowthDefense) { hero.Defense++; } rng = rand.Next(101); if (rng < hero.GrowthResistance) { hero.Resistance++; } /* * hero.MaxHealth++; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.5; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0; * hero.Dex = hero.Dex + 0.5; * hero.Will = hero.Will + 0.75; * hero.Luck = hero.Luck + 0.75;*/ }
protected override void End() { target.ChangeDirection(target.Direction); target = null; base.End(); }
public TaskIdle(BaseCharacter character, Task task) : base(character, task) { }
public void StanceChange(BaseCharacter target, StanceEnum stance) { RenderMessage("{0} changed its stance to {1}", new object[] { target.Name, stance }); target.Stance = (int)stance; }
/// <summary> /// /// </summary> /// <param name="character"></param> public void SendDestroyToPlayer(BaseCharacter character) { }
protected override void ApplyDamage(BaseCharacter target) { target.TakeDamage(damage); }
public void StoreLoop(BaseCharacter hero) { do { bool checkitem = false; Console.WriteLine("What would you like to buy?"); Console.Write(@" (S)word: 800 gold +7-16 Attack (H)elmet: 580 gold +1 Defense (A)rmor: 3800 gold +6 Defense (G)auntlets 760 gold +2 Defense (B)oots 650 gold +1 Defense (D)one: "); Console.WriteLine(); choice = Console.ReadLine(); switch (choice) { /*case "S": * case "s": * checkitem = hero.CheckItems(sword); * if (checkitem == false) * { * if (hero.Gold >= 800) * { * hero.Gold -= 800; * hero.items.Add(sword); * hero.EquipPow += 8; * Console.WriteLine("Thank you {0}!", hero.Identifier); * } * else * { * Console.WriteLine("You don't have enough money. Come back when ya do"); * } * } * else * { * Console.WriteLine("You've already got that!"); * } * break; * case "H": * case "h": * checkitem = hero.CheckItems(helmet); * if (checkitem == false) * { * if (hero.Gold >= 580) * { * hero.Gold -= 580; * hero.items.Add(helmet); * hero.Defense += 1; * Console.WriteLine("Thank you {0}!", hero.Identifier); * } * else * { * Console.WriteLine("You don't have enough money. Come back when ya do"); * } * } * else * { * Console.WriteLine("You've already got that!"); * } * break; * case "A": * case "a": * checkitem = hero.CheckItems(armor); * if (checkitem == false) * { * if (hero.Gold >= 3800) * { * hero.Gold -= 3800; * hero.items.Add(armor); * hero.Defense += 6; * Console.WriteLine("Thank you {0}!", hero.Identifier); * } * else * { * Console.WriteLine("You don't have enough money. Come back when ya do"); * } * } * else * { * Console.WriteLine("You've already got that!"); * } * break; * case "G": * case "g": * checkitem = hero.CheckItems(gauntlets); * if (checkitem == false) * { * if (hero.Gold >= 760) * { * hero.Gold -= 760; * hero.items.Add(gauntlets); * hero.Defense += 2; * Console.WriteLine("Thank you {0}!", hero.Identifier); * } * else * { * Console.WriteLine("You don't have enough money. Come back when ya do"); * } * } * else * { * Console.WriteLine("You've already got that!"); * } * break; * case "B": * case "b": * checkitem = hero.CheckItems(boots); * if (checkitem == false) * { * if (hero.Gold >= 650) * { * hero.Gold -= 650; * hero.items.Add(boots); * hero.Defense += 1; * Console.WriteLine("Thank you {0}!", hero.Identifier); * } * else * { * Console.WriteLine("You don't have enough money. Come back when ya do"); * } * } * else * { * Console.WriteLine("You've already got that!"); * } * break;*/ case "D": case "d": Console.WriteLine("Goodbye, and be careful out there!"); break; default: Console.WriteLine("I can't understand that gibberish you're sayin'"); break; } }while (choice != "d" && choice != "D"); Console.WriteLine("Press enter to continue...."); Console.ReadLine(); }
public void AddAttackTurn(BaseCharacter attacker, BaseCharacter target, int attackIndex) { turnList.Add(new Turn(attacker, target, attacker.usableAttacks[attackIndex])); }
public SecondaryAttManager(BaseCharacter character) { SetupSecAttributes(character); SetupSecAttributesModifiers(character); }
public override bool OnUseSkill(BaseCharacter player) { throw new System.NotImplementedException(); }
public virtual bool AppliesTo(BaseCharacter attacker, BaseCharacter target, int damageDealt, Attack attack) { return(true); }
public Store(BaseCharacter hero) { Console.Clear(); Console.WriteLine("Welcome to the store!"); StoreLoop(hero); }
/* * protected void lvl10Proc(Hero hero) * { * hero.MaxHealth++; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.5; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0; * hero.Dex = hero.Dex + 0.5; * hero.Will = hero.Will + 0.75; * hero.Luck = hero.Luck + 0.75; * } * * protected void lvl11Proc(Hero hero) * { * hero.MaxHealth++; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.5; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0; * hero.Dex = hero.Dex + 0.75; * hero.Will = hero.Will + 0.75; * hero.Luck = hero.Luck + 0.5; * } * * protected void lvl12Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.75; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0; * hero.Dex = hero.Dex + 0.75; * hero.Will = hero.Will + 0.75; * hero.Luck = hero.Luck + 0.5; * } * * protected void lvl13Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.75; * hero.MaxMana = hero.MaxMana + 0.5; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.25; * hero.Dex = hero.Dex + 0.75; * hero.Will = hero.Will + 0.75; * hero.Luck = hero.Luck + 0.25; * } * * protected void lvl14Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.75; * hero.MaxMana = hero.MaxMana + 0.5; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.25; * hero.Dex = hero.Dex + 0.5; * hero.Will = hero.Will + 0.5; * hero.Luck = hero.Luck + 0.25; * } * * protected void lvl15Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.75; * hero.MaxMana = hero.MaxMana + 0.5; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.5; * hero.Dex = hero.Dex + 0.25; * hero.Will = hero.Will + 0.5; * hero.Luck = hero.Luck + 0; * } * * protected void lvl16Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.5; * hero.MaxMana = hero.MaxMana + 0.75; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.5; * hero.Dex = hero.Dex + 0.25; * hero.Will = hero.Will + 0.5; * hero.Luck = hero.Luck + 0; * } * * protected void lvl17Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.5; * hero.MaxMana = hero.MaxMana + 0.75; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.75; * hero.Dex = hero.Dex + 0; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl18Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.5; * hero.MaxMana = hero.MaxMana + 0.75; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.75; * hero.Dex = hero.Dex + 0; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl19Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.5; * hero.MaxMana = hero.MaxMana + 0.75; * hero.MaxStamina = hero.MaxStamina + 0.75; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 0.75; * hero.Dex = hero.Dex + 0; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl20Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.25; * hero.MaxMana = hero.MaxMana + 0.5; * hero.MaxStamina = hero.MaxStamina + 0.5; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 1; * hero.Dex = hero.Dex + 0.5; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl21Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.25; * hero.MaxMana = hero.MaxMana + 0.5; * hero.MaxStamina = hero.MaxStamina + 0.5; * hero.Str = hero.Str + 0.5; * hero.Int = hero.Int + 1; * hero.Dex = hero.Dex + 0.5; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl22Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.25; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.25; * hero.Str = hero.Str + 0.25; * hero.Int = hero.Int + 0.75; * hero.Dex = hero.Dex + 0.75; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl23Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0.25; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.25; * hero.Str = hero.Str + 0.25; * hero.Int = hero.Int + 0.5; * hero.Dex = hero.Dex + 0.5; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * } * * protected void lvl24Proc(Hero hero) * { * hero.MaxHealth = hero.MaxHealth + 0; * hero.MaxMana = hero.MaxMana + 0.25; * hero.MaxStamina = hero.MaxStamina + 0.25; * hero.Str = hero.Str + 0.25; * hero.Int = hero.Int + 0.25; * hero.Dex = hero.Dex + 0.25; * hero.Will = hero.Will + 0.25; * hero.Luck = hero.Luck + 0; * }*/ public bool LevelUp(BaseCharacter hero) { /*LvlMultiplier = hero.Level + 1; * temp1 = 4 * LvlMultiplier - 51; * temp2 = LvlMultiplier * temp1 + 267; * EP_L = LvlMultiplier * temp2 - 302;*/ do { EP_L = ExpCalculater(hero.LVL + 1); if (hero.EXP >= EP_L) { hero.LVL++; hero.SkillPoint++; lvlupProc(hero); /*switch (hero.Age) * { * case 10: * lvl10Proc(hero); * break; * case 11: * lvl11Proc(hero); * break; * case 12: * lvl12Proc(hero); * break; * case 13: * lvl13Proc(hero); * break; * case 14: * lvl14Proc(hero); * break; * case 15: * lvl15Proc(hero); * break; * case 16: * lvl16Proc(hero); * break; * case 17: * lvl17Proc(hero); * break; * case 18: * lvl18Proc(hero); * break; * case 19: * lvl19Proc(hero); * break; * case 20: * lvl20Proc(hero); * break; * case 21: * lvl21Proc(hero); * break; * case 22: * lvl22Proc(hero); * break; * case 23: * lvl23Proc(hero); * break; * case 24: * lvl24Proc(hero); * break; * }*/ lvlUp = true; IslvlUp = true; } else if (hero.EXP < EP_L) { lvlUp = false; } else { Console.WriteLine("there was an error processing level ups"); Console.ReadLine(); Console.Clear(); } } while (lvlUp == true); return(IslvlUp); }
internal void AddText(String s, BaseCharacter p, Vector2 os, Point tbs, int steps) { texts.Add(new TacticalTextPopUp(s, p, os, tbs, steps, UpdateAreaCombatText)); }
/// <summary> /// Constructor from an enumeration. /// </summary> /// <param name="character"></param> /// <param name="entries"></param> public PlanScratchpad(BaseCharacter character, IEnumerable <PlanEntry> entries) : this(character) { AddRange(entries); }
/// <summary> /// The Skill is used and takes effect.</summary> public abstract void Use(BaseCharacter user);
public BlockInfo(BaseCharacter character, BlockType type) { blockType = type; characterWhoBlocked = character; timeBlocked = Time.time; }
/// <summary> /// Add the modifier to the modified attribute.</summary> public override void Use(BaseCharacter user) { user.Stats.Dict[ModifiedAttributeName].AddModifier(GetModifier()); }
public CharacterEventInfoClass(int _arrivals, BaseCharacter _character) { character = _character; arrivals = _arrivals; SetupOtherStuff(); }
public override AbilityCommand getCommand(BaseCharacter actor, BaseCharacter target) { return(new AttackCommand(actor, target, castTime, damage)); }
public CharacterTestScreen() { testCharacter = new BaseCharacter(); }
private void SetupMovespeed(BaseCharacter character) { int ms_f = 1; character.SecondaryAttributeList [(int)SecondaryAttributeName.Movement_Speed].SetValues(ms_f, 10, 1); }
public void AddWaitTurn(BaseCharacter waiter) { turnList.Add(new Turn(waiter, null, defaultWaitPrefab)); }
public void AddStandardAttackTurn(BaseCharacter attacker, BaseCharacter target) { turnList.Add(new Turn(attacker, target, defaultAttackPrefab)); }
/// <summary> /// Constructor from an enumeration. /// </summary> /// <param name="character"></param> /// <param name="entries"></param> public PlanScratchpad(BaseCharacter character, IEnumerable<PlanEntry> entries) : this(character) { AddRange(entries); }
public void AddDefendTurn(BaseCharacter defender) { turnList.Add(new Turn(defender, null, defaultDefendPrefab)); }