private void OnDestinationSelected(Target?obj) { if (!obj.HasValue) { return; } Target value = obj.Value; if (value.type == Target.Type.Coord) { if (m_selectedEntity == null) { SetTargetingPhase(null); return; } Coord coord = value.coord; AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { Teleport = new AdminRequestCmd.Types.TeleportAdminCmd { TargetEntityId = m_selectedEntity.id, Destination = coord.ToCellCoord() } }); m_movingEntity = new Tuple <IEntityWithBoardPresence, Coord>(m_selectedEntity, coord); m_selectedEntity = null; FightMap fightMap = m_fightMap; fightMap.onTargetSelected = (Action <Target?>)Delegate.Remove(fightMap.onTargetSelected, new Action <Target?>(OnDestinationSelected)); EndTargetingPhase(); } }
private static void OnUpdateTarget(Target?obj) { IEntity entity = obj?.entity; if (entity != null) { AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { Kill = new AdminRequestCmd.Types.KillAdminCmd { TargetEntityId = entity.id } }); } }
private void InvokeCreatureAt(Target?target) { CharacterDefinition selected = m_creatureDropper.selected; if (target.HasValue && selected != null) { AdminRequestCmd adminRequestCmd = CreateRequest(GetPlayerOrOpponent(), selected, m_level, target.Value.coord.ToCellCoord()); if (adminRequestCmd != null) { AbstractFightAdminCommand.SendAdminCommand(adminRequestCmd); } } m_targeting = false; m_creatureDropper.SetActive(active: false); }
} //IL_0006: Unknown result type (might be due to invalid IL or missing references) protected override void Execute() { PlayerStatus playerOrOpponent = GetPlayerOrOpponent(); if (playerOrOpponent != null) { int quantity = (!AbstractFightAdminCommand.IsShiftDown()) ? 1 : 10; AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { GainReservePoints = new AdminRequestCmd.Types.GainReservePointsCmd { PlayerEntityId = playerOrOpponent.id, Quantity = quantity } }); } }
private void OnEntitySelected(Target?obj) { IEntity entity = obj?.entity; if (entity != null) { SetTargetingPhase(); AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { SetElementaryState = new AdminRequestCmd.Types.SetElementaryStateAdminCmd { TargetEntityId = entity.id, ElementaryStateId = (int)(AbstractFightAdminCommand.IsShiftDown() ? ElementaryStates.None : m_elementaryStateSelector.selected) } }); } }
} //IL_0006: Unknown result type (might be due to invalid IL or missing references) protected override void Execute() { PlayerStatus playerOrOpponent = GetPlayerOrOpponent(); if (playerOrOpponent != null) { int quantity = (!AbstractFightAdminCommand.IsShiftDown()) ? 1 : (GameStatus.fightDefinition.maxSpellInHand - playerOrOpponent.spellCount); AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { DrawSpells = new AdminRequestCmd.Types.DrawSpellsCmd { PlayerEntityId = playerOrOpponent.id, Quantity = quantity } }); } }
} //IL_0006: Unknown result type (might be due to invalid IL or missing references) protected override void Execute() { PlayerStatus playerOrOpponent = GetPlayerOrOpponent(); if (playerOrOpponent != null) { int quantity = (!AbstractFightAdminCommand.IsShiftDown()) ? 1 : playerOrOpponent.spellCount; AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { DiscardSpells = new AdminRequestCmd.Types.DiscardSpellsCmd { PlayerEntityId = playerOrOpponent.id, Quantity = quantity } }); } }
private static void OnUpdateTarget(Target?obj) { IEntity entity = obj?.entity; if (entity != null) { int quantity = (!AbstractFightAdminCommand.IsShiftDown()) ? 1 : 10; AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { DealDamage = new AdminRequestCmd.Types.DealDamageAdminCmd { TargetEntityId = entity.id, Magical = !AbstractFightAdminCommand.IsAltDown(), Quantity = quantity } }); } }
private void OnEntitySelected(Target?obj) { IEntity entity = obj?.entity; if (entity != null) { bool active = !AbstractFightAdminCommand.IsShiftDown(); AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { SetProperty = new AdminRequestCmd.Types.SetPropertyCmd { TargetEntityId = entity.id, PropertyId = (int)m_propertySelector.selected, Active = active } }); SetTargetingPhase(); } }
private void OnSpellSelected(SpellDefinition definition, int level, Event lastEvent) { PlayerStatus playerOrOpponent = GetPlayerOrOpponent(lastEvent); int num = (!lastEvent.get_shift()) ? 1 : (GameStatus.fightDefinition.maxSpellInHand - playerOrOpponent.spellCount); if (num != 0) { AbstractFightAdminCommand.SendAdminCommand(new AdminRequestCmd { PickSpell = new AdminRequestCmd.Types.PickSpellCmd { PlayerEntityId = playerOrOpponent.id, Quantity = num, SpellDefinitionId = definition.get_id(), SpellLevel = level } }); } }