//Determine if the skill could be used targetting the passed selections public bool CanSelect(InputSkillSelection selections) { //First, check if we're at least alive if (chrOwner.bDead == true) { return(false); } //Check that we're in a readiness state (with enough usable skills left) if (chrOwner.curStateReadiness.CanSelectSkill(this) == false) { //Debug.Log("Not in a state where we can use this skill"); return(false); } //Check that the skill isn't on cooldown if (skillslot.IsOffCooldown() == false) { //Debug.Log ("Skill on cd"); return(false); } if (selections.HasLegallyFilledTargets() == false) { Debug.Log("This selection has an invalid choice"); return(false); } return(true); }
public override void ClauseEffect(InputSkillSelection selections) { //First, deal damage to all enemies List <Chr> lstChrEnemy = skill.chrOwner.plyrOwner.GetEnemyPlayer().GetActiveChrs(); for (int i = 0; i < lstChrEnemy.Count; i++) { //For each enemy, deal our dmgEnemy to them ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, lstChrEnemy[i], dmgEnemy) { sLabel = "WAAAAAAAHWAAHWAHHH" }); } //Then damage each of our allies List <Chr> lstChrAlly = skill.chrOwner.plyrOwner.GetActiveChrs(); for (int i = 0; i < lstChrAlly.Count; i++) { //For each ally, deal our dmgAlly to them ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, lstChrAlly[i], dmgAlly) { sLabel = "Really, dude?" }); } }
public override void ClauseEffect(InputSkillSelection selections) { ContSkillEngine.PushSingleExecutable(new ExecApplySoulPosition(skill.chrOwner, skill.chrOwner.position, new SoulPositionBunker(soulToCopy, skill.chrOwner.position)) { sLabel = "Hunker down" }); }
//Get a random valid selection for this type of target (for AI purposes mainly) public object GetRandomValidSelectable(InputSkillSelection selectionsSoFar) { List <object> lstPossibleValidSelections = GetValidSelectable(selectionsSoFar); int nRandomIndex = Random.Range(0, lstPossibleValidSelections.Count); return(lstPossibleValidSelections[nRandomIndex]); }
public void StartLocalSelection(InputSkillSelection _selectionsSoFar) { //Temporarily store the currently made selections so far in case we need to retrieve them to assist in our targetting selectionsSoFar = _selectionsSoFar; ContGlobalInteractions.subGlobalRightClick.Subscribe(cbCancelSelectionProcess); OnStartLocalSelection(); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecSwitchChar(skill.chrOwner, chrSelected, (chrTarget) => ContPositions.Get().GetInFrontPosition(chrTarget.position)) { sLabel = "Hey, I caught one!" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecHeal(skill.chrOwner, chrSelected, healing) { sLabel = "Drink my life-juice" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; //TODO - maybe add some sort of additional function that can be called exactly when the executable resolves to trigger additional effects // e.g., here it could be a structure called Tracking where you call Tracking.BeforeEffect() to track the gamestate before the executable // evaluates (this can store information, and then you call Tracking.AfterEffect() to ContSkillEngine.PushSingleExecutable(new ExecMoveChar(skill.chrOwner, chrSelected, (chrTarget) => ContPositions.Get().GetBehindPosition(chrTarget.position))); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg) { sLabel = "Gimme yer life-juice" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = skill.chrOwner; ContSkillEngine.PushSingleExecutable(new ExecLoseLife(skill.chrOwner, chrSelected, nLifeLoss) { sLabel = "It's going berserk" }); }
public void EndLocalSelection() { //Clean up any local-setup for chosing this target (like spawned UI) OnEndLocalSelection(); ContGlobalInteractions.subGlobalRightClick.UnSubscribe(cbCancelSelectionProcess); //Clear out the temporary local storage of the ongoing selections selectionsSoFar = null; }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg) { arSoundEffects = new SoundEffect[] { new SoundEffect("PitBeast/sndTendrilStab", 3.067f) }, sLabel = "Stab, stab, stab" }); }
void ReceiveMatchInput(int indexInput, int[] arnSerializedMatchInput) { //TODO - figure out which deserialization process should be used - always using InputSkillSelection here, but // we could pass some extra input-type enum along with the input to let us know which matchinput type we should decode into //Deserialize the passed selections InputSkillSelection selectionsReceived = new InputSkillSelection(arnSerializedMatchInput); AddInputToBuffer(indexInput, selectionsReceived); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulHunted(soulToCopy, chrSelected)) { arSoundEffects = new SoundEffect[] { new SoundEffect("Fischer/sndHuntersQuarry", 0.867f) }, sLabel = "I'm gonna get ya" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = skill.chrOwner; ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulEvolved(soulToCopy, chrSelected)) { arSoundEffects = new SoundEffect[] { new SoundEffect("PitBeast/sndForcedEvolution", 4.667f) }, sLabel = "It's evolving" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = skill.chrOwner; ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulFortissimo(soulToCopy, chrSelected)) { arSoundEffects = new SoundEffect[] { new SoundEffect("Katarina/sndFortissimo", 6.2f) }, sLabel = "Let's do it louder this time" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecStun(skill.chrOwner, chrSelected, nStunAmount) { arSoundEffects = new SoundEffect[] { new SoundEffect("Saiko/sndTranquilize", 1.4f) }, sLabel = "Shhh... Look at my daughter." }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulCloudCushion(soulToCopy, chrSelected)) { arSoundEffects = new SoundEffect[] { new SoundEffect("Rayne/sndCloudCushion", 3.467f) }, sLabel = "Ooh, so soft" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg) { arSoundEffects = new SoundEffect[] { new SoundEffect("Fischer/sndHarpoonGun", 2.067f) }, sLabel = "Behold, the power of my stand, Beach Boy!" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = skill.chrOwner; ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulSmokeCover(soulToCopy, chrSelected)) { arSoundEffects = new SoundEffect[] { new SoundEffect("Saiko/sndSmokeCover", 4.3f) }, sLabel = "Disappearing into the shadows..." }); }
public override void ClauseEffect(InputSkillSelection selections) { ManaDate manadateCur = skill.chrOwner.plyrOwner.manacalendar.GetCurrentManaDate(); Property <Mana> .Modifier modManaToAdd = new Property <Mana> .Modifier((Mana mana) => Mana.AddMana(mana, manaToAdd)); ContSkillEngine.PushSingleExecutable(new ExecApplyManaDateMod(skill.chrOwner, manadateCur, modManaToAdd) { sLabel = "Planting a new seed" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = skill.chrOwner; Position posToSwitchTo = (Position)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecSwitchChar(skill.chrOwner, chrSelected, posToSwitchTo) { sLabel = "I'll lead the way" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; //Push an executable with this skill's owner as the source, the selected character as the target, // and we can copy the stored healing instance to apply ContSkillEngine.PushSingleExecutable(new ExecHeal(skill.chrOwner, chrSelected, heal) { sLabel = "Healing" }); }
public override void ClauseEffect(InputSkillSelection selections) { SkillSlot ssAdaptingFrom = (SkillSlot)selections.lstSelections[1]; SkillType.SKILLTYPE skilltypeAdaptingTo = (SkillType.SKILLTYPE)selections.lstSelections[2]; Debug.Log("Adapting to " + skilltypeAdaptingTo); ContSkillEngine.PushSingleExecutable(new ExecAdaptSkill(skill.chrOwner, ssAdaptingFrom, skilltypeAdaptingTo) { sLabel = "Adapting skill" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecApplySoulChr(skill.chrOwner, chrSelected, new SoulImpaled(soulToCopy, chrSelected))); ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg) { arSoundEffects = new SoundEffect[] { new SoundEffect("Fischer/sndImpale", 1.833f) }, sLabel = "Get Kakyoin'd" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; //Push an executable with this skill's owner as the source, the selected character as the target, // and we can copy the stored healing instance to apply ContSkillEngine.PushSingleExecutable(new ExecHeal(skill.chrOwner, chrSelected, heal) { arSoundEffects = new SoundEffect[] { new SoundEffect("Katarina/sndSerenade", 5.3f) }, sLabel = "<Darude's Sandstorm on Recorder>" }); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; List <Chr> lstChrsOnTeam = chrSelected.plyrOwner.GetActiveChrs(); for (int i = 0; i < lstChrsOnTeam.Count; i++) { ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, lstChrsOnTeam[i], dmg) { sLabel = "Explodin'" }); } }
public override void ClauseEffect(InputSkillSelection selections) { //Check if the character has any fatigue already if (skill.chrOwner.nFatigue == 0) { //If not, then give them the rest fatigue ContSkillEngine.Get().AddExec(new ExecChangeFatigue(skill.chrOwner, skill.chrOwner, nRestFatigue, false) { sLabel = "Resting" }); } skill.chrOwner.SetStateReadiness(new StateFatigued(skill.chrOwner)); }
public override void ClauseEffect(InputSkillSelection selections) { Chr chrSelected = (Chr)selections.lstSelections[1]; ContSkillEngine.PushSingleExecutable(new ExecLoseLife(skill.chrOwner, skill.chrOwner, nLifeloss) { sLabel = "Owie" }); ContSkillEngine.PushSingleExecutable(new ExecDealDamage(skill.chrOwner, chrSelected, dmg) { arSoundEffects = new SoundEffect[] { new SoundEffect("Sophidia/sndTwinSnakes", 2f) }, sLabel = "Snakey, no!" }); }
//Fetch the current selection information passed to us from the Master public virtual InputSkillSelection GetUsedSelections() { InputSkillSelection selections = (InputSkillSelection)NetworkMatchReceiver.Get().GetCurMatchInput(); //You can only get legitimate selections for this skill if the selection passed is referring to // this skill Debug.Assert(selections != null, "ERROR - Master has passed no selectionsFromMaster at this point"); Debug.Assert(ContTurns.Get().GetNextActingChr() == skill.chrOwner, "ERROR - The acting character isn't the owner of this skill"); Debug.Assert(selections.skillslotSelected.skill == skill, "ERROR - The selected skill from the player does not match this skill"); return selections; }