コード例 #1
0
ファイル: KenBot.cs プロジェクト: Hatnice/UltraBotFramework
        public override System.Collections.Generic.IEnumerator<string> Run(Bot bot)
        {
            var alternate = 0;

            while(bot.enemyState.ActiveCancelLists.Contains("GROUND"))
            {
                if(alternate++ % 2 == 0)
                    bot.pressButton("2");
                else
                    bot.pressButton("3");
                yield return "mashing DP motion";
            }
            bot.pressButton("3HP");
            yield return "they pressed a button! doing DP!";
        }
コード例 #2
0
ファイル: GiefBot.cs プロジェクト: Hatnice/UltraBotFramework
        public override System.Collections.Generic.IEnumerator<string> Run(Bot bot)
        {
            var r = new Random();
            var chosenCombo = (from combo in bot.getComboList()
                              where
                                  combo.Score > 0 && combo.Type.HasFlag(ComboType.GROUND)
                              orderby combo.Score descending
                              
                              select combo).Take(5);
            if (chosenCombo.Count() == 0)
			{
				_reason = "No combos?";
                yield break;
			}
            var c = chosenCombo.ElementAt(r.Next(chosenCombo.Count()));
            var timer = 0;
            while(Math.Abs(bot.myState.XDistance) > c.XMax || bot.enemyState.ActiveCancelLists.Contains("REVERSAL") || bot.enemyState.ScriptName.Contains("UPWARD"))
            {
                bot.pressButton("6");
                if (timer++ > 10)
				{
					_reason = "Rerolling";
                    yield break;
				}
                
                yield return "Getting in range"+timer;
            }

			var substate = new SequenceState(c.Input);
			while(!substate.isFinished())
				yield return substate.Process(bot);
        }
コード例 #3
0
ファイル: KenBot.cs プロジェクト: Hatnice/UltraBotFramework
 public override System.Collections.Generic.IEnumerator<string> Run(Bot bot)
 {
     while(Math.Abs(bot.myState.XDistance) > 1)
     {
         bot.pressButton("6");
         yield return "Getting in range";
     }
     if(!bot.enemyState.ActiveCancelLists.Contains("REVERSAL"))
     {
         var substate = new SequenceState("1LP.W18.*2HP.2MPHP.W10.6.2.3HP");
         while(!substate.isFinished())
             yield return substate.Process(bot);
     }
     yield break;
 }