public CmdActivateSkill(CharacterInstance character, SkillType skillType, float buildUpTime, SkillExecutionStats executionStats) { this.m_character = character; this.m_skillType = skillType; this.m_buildUpTime = buildUpTime; this.m_executionStats = executionStats; }
public void activateSkill(CharacterInstance c, SkillType skillType, [Optional, DefaultParameterValue(-1f)] float overrideBuildupTime, [Optional, DefaultParameterValue(null)] CharacterInstance overrideTargetCharacter) { float buildUpTime = !c.IsBoss ? ConfigSkills.SHARED_DATA[skillType].BuildupTime : ConfigSkills.SHARED_DATA[skillType].BossBuildupTime; if (overrideBuildupTime > -1f) { buildUpTime = overrideBuildupTime; } SkillExecutionStats executionStats = new SkillExecutionStats(); executionStats.TargetCharacter = (overrideTargetCharacter == null) ? c : overrideTargetCharacter; Coroutine coroutine = GameLogic.Binder.CommandProcessor.executeCharacterSpecific(c, new CmdActivateSkill(c, skillType, buildUpTime, executionStats), 0f); if (!executionStats.PreExecuteFailed) { c.SkillRoutines.Add(skillType, coroutine); } }
public static IEnumerator ExecuteRoutine(CharacterInstance c, int rank, SkillExecutionStats executionStats) {
public static IEnumerator ExecuteRoutine(CharacterInstance c, int rank, SkillExecutionStats executionStats) { return(new < ExecuteRoutine > c__IteratorC8()); }
public static IEnumerator ExecuteRoutine(CharacterInstance c, int rank, SkillExecutionStats executionStats, [Optional, DefaultParameterValue(0.25f)] float damagePct) {
private void onCharacterSkillExecuted(CharacterInstance character, SkillType skillType, SkillExecutionStats executionStats) { if (character.IsBoss || (character == this.PhysicsBody.AttachedCharacter)) { this.recalculatePath(); } }
private void onCharacterSkillExecutionMidpoint(CharacterInstance c, SkillType skillType, SkillExecutionStats executionStats) { if (c.IsPrimaryPlayerCharacter) { Player owningPlayer = c.OwningPlayer; ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; if ((skillType == SkillType.Leap) && (c.getPerkInstanceCount(PerkType.SkillUpgradeLeap1) > 0)) { double baseCoinReward = App.Binder.ConfigMeta.MinionCoinDropCurve(activeDungeon.Floor) * ConfigSkills.Leap.UpgradedBonusCoinCountPerUsage; double amountPerDrop = Math.Max(Math.Round((double)(owningPlayer.calculateStandardCoinRoll(baseCoinReward, GameLogic.CharacterType.UNSPECIFIED, 1) / 5.0)), 1.0); GameLogic.Binder.LootSystem.triggerResourceExplosion(ResourceType.Coin, c.PhysicsBody.Transform.position, amountPerDrop, 5, "TRACKING_ID_GAMEPLAY_LOOT_GAIN"); } } }
private void onCharacterSkillActivated(CharacterInstance character, SkillType skillType, float buildupTime, SkillExecutionStats executionStats) { if (character.IsPrimaryPlayerCharacter) { for (int i = 0; i < this.sm_postSkillUsePerks[SkillType.NONE].Count; i++) { PerkType perkType = this.sm_postSkillUsePerks[0][i]; List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(character, perkType); for (int k = 0; k < perkInstancesOfType.Count; k++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[k]; PerkInstance key = pair.Key; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[k]; BuffSource source = pair2.Value; GameLogic.Binder.BuffSystem.startBuffFromPerk(character, perkType, ConfigPerks.SHARED_DATA[perkType].DurationSeconds, (double)key.Modifier, source, null); } } for (int j = 0; j < ConfigSkills.ACTIVE_HERO_SKILLS.Count; j++) { if (skillType == ((SkillType)ConfigSkills.ACTIVE_HERO_SKILLS[j])) { for (int m = 0; m < this.sm_postSkillUsePerks[skillType].Count; m++) { PerkType type2 = this.sm_postSkillUsePerks[skillType][m]; List <KeyValuePair <PerkInstance, BuffSource> > list2 = CharacterStatModifierUtil.GetPerkInstancesOfType(character, type2); for (int n = 0; n < list2.Count; n++) { KeyValuePair <PerkInstance, BuffSource> pair3 = list2[n]; PerkInstance instance2 = pair3.Key; KeyValuePair <PerkInstance, BuffSource> pair4 = list2[n]; BuffSource source2 = pair4.Value; GameLogic.Binder.BuffSystem.startBuffFromPerk(character, type2, ConfigPerks.SHARED_DATA[type2].DurationSeconds, (double)instance2.Modifier, source2, null); } } } } if ((skillType == SkillType.Leap) && (character.getPerkInstanceCount(PerkType.SkillUpgradeLeap3) > 0)) { character.NextAttackIsGuaranteedCritical = true; } if (GameLogic.Binder.GameState.ActiveDungeon.hasDungeonModifier(DungeonModifierType.HeroPostSkillIncreasedSkillDamage)) { Buff buff2 = new Buff(); buff2.BaseStat1 = BaseStatProperty.SkillDamage; buff2.Modifier = ConfigDungeonModifiers.HeroPostSkillIncreasedSkillDamage.Modifier; buff2.DurationSeconds = ConfigDungeonModifiers.HeroPostSkillIncreasedSkillDamage.BuffDurationSeconds; BuffSource source3 = new BuffSource(); source3.Object = ConfigDungeonModifiers.HeroPostSkillIncreasedSkillDamage.BuffSource; buff2.Source = source3; buff2.HudSprite = "sprite_knight_player_256"; buff2.HudShowStacked = true; buff2.HudHideTimer = true; Buff buff = buff2; GameLogic.Binder.BuffSystem.startBuff(character, buff); } } }
private void onCharacterSkillActivated(CharacterInstance character, SkillType skillType, float buildupTime, SkillExecutionStats executionStats) { if (character.IsPrimaryPlayerCharacter) { string key = skillType.ToString(); for (int i = 0; i < this.m_heroStats.Count; i++) { if (!this.m_heroStats[i].SkillActivationCounts.ContainsKey(key)) { this.m_heroStats[i].SkillActivationCounts.Add(key, 1); } else { Dictionary <string, int> dictionary; string str2; int num2 = dictionary[str2]; (dictionary = this.m_heroStats[i].SkillActivationCounts)[str2 = key] = num2 + 1; } } } }
private void onCharacterSkillExecuted(CharacterInstance c, SkillType skillType, SkillExecutionStats executionStats) { if (c.IsPrimaryPlayerCharacter && (executionStats.KillCount >= ConfigMeta.MULTIKILL_REWARD_MIN_KILL_COUNT)) { this.grantMultikillReward(executionStats.KillCount); } }
private static IEnumerator ExecuteDash(CharacterInstance c, int rank, SkillExecutionStats executionStats) {
private void onCharacterSkillExecuted(CharacterInstance character, SkillType skillType, SkillExecutionStats executionStats) { if ((skillType == SkillType.Blast) && !character.IsPlayerCharacter) { this.killCharacter(character, character, false, false, SkillType.NONE); } }