コード例 #1
0
        } //open map file

        private void START_Click(object sender, RoutedEventArgs e)
        {
            LOGS.Clear();
            //try
            //{
            ComboBoxItem typeItem = (ComboBoxItem)ComboBoxMW.SelectedItem;

            try
            {
                StructureValue = StructureValues(typeItem.Content.ToString());
                AppendLog("Wybrano układ " + typeItem.Content.ToString() + " [" + StructureValue + "]");
            }
            catch (Exception)
            {
                //System.Windows.MessageBox.Show("Układ nie został wybrany", "BŁĄD");
            }

            JsonFile = JsonPath.Text;
            MapFile  = MapPath.Text;

            AssignValuesFromJson(JsonFile);
            JPGWFile(MapFile);

            AppendLog("Ścieżka pliku world: " + JPGWPath);

            CreateWorldFile();
            //}
            //catch (Exception excp) { System.Windows.MessageBox.Show("Wprowadź poprawnie wszystkie dane: " + excp, "Wystąpił błąd"); }
        }
コード例 #2
0
 public void SelfHeal()
 {
     if (!this.SpendManaFor(10))
     {
         return;
     }
     LOGS.Add(String.Format("{0} uses ACTIVE ABILITY \"Self heal + DMG buff\"", NameFull));
     this.HealFor(LibRPHG.BuffsDebuffs.BuffsConsts.DruidSelfHeal);
     this.AddBuff(new LibRPHG.BuffsDebuffs.DruidDamageBuff(this, this));
 }
コード例 #3
0
 public ServicePrefix1()
 {
     daoTXF     = new TXF();
     daoLOGSP   = new LOGSP();
     daoLOGS    = new LOGS();
     daoTXEMAIL = new TXEMAIL();
     daoTXF1    = new TXF1();
     daoTXF2    = new TXF2();
     daoJRF     = new JRF();
     daoOCF     = new OCF();
 }
コード例 #4
0
 public Form1()
 {
     InitializeComponent();
     // Model -> View Concept
     _mList = new List <string>();
     cls_globalvariables.logList.ListChanged += new ListChangedEventHandler(logList_ListChanged);
     listBox1.DataSource = _mList;
     LOGS.LOG_PRINT("Hello");
     LOGS.LOG_PRINT("Hello");
     LOGS.LOG_PRINT("Hello");
 }
コード例 #5
0
 public void PartyRegen(Battlefield bf)
 {
     if (!this.SpendManaFor(40))
     {
         return;
     }
     LOGS.Add(String.Format("{0} uses ACTIVE ABILITY \"Party HP MP regen\"", NameFull));
     foreach (Abstraceunit ab in bf.getUnitsInObl(this.GetPosition, 4, false, this.getTeamNumber))
     {
         ab.AddBuff(new LibRPHG.BuffsDebuffs.DruidSplash(ab, this));
     }
 }
コード例 #6
0
        public void OnHealthChange()
        {
            if (_bufftarget == null)
            {
                _currentDamageGiven = 0;
                return;
            }
            int newDamageGiven = (_bufftarget.getMaxHP - _bufftarget.getCurrentHP) * BuffsConsts.BarbarianDamagePerHPmiss;

            _bufftarget._att_dmg_mod += newDamageGiven - _currentDamageGiven;
            LOGS.Add(String.Format("{0} get +{1} DMG buff from \"blood rage\"", _bufftarget.NameFull, newDamageGiven - _currentDamageGiven));
            _currentDamageGiven = newDamageGiven;
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: P1nkL1on/Raid-generator
        static void Main(string[] args)
        {
            Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight);
            Console.SetWindowPosition(0, 0);

            //LibRPHG.PlayerClasses.CharacterSelect.generateTeam(0);

            //int charCount = 40;
            //while (charCount-- > 0)
            //{
            //    Abstractplayer nu =
            //        LibRPHG.PlayerClasses.CharacterSelect.getPlayerByIndex(rnd.Next(25),
            //        new Point(rnd.Next(Calculator.FieldSize), rnd.Next(Calculator.FieldSize)));
            //    nu.TeamNumber = 1;
            //    bf.addUnit(nu);
            //}
            int raidCount = 1;

            while (true)
            {
                BFConst.currentUnitID = 0;
                for (int i = 0; i < raidCount; i++)
                {
                    Abstraceunit dm = CharacterSelect.getPlayerByIndex(1 /*rnd.Next(25)*/, new Point(Calculator.FieldSize / 2, Calculator.FieldSize / 2));
                    dm.TeamNumber = 1;
                    bf.addUnit(dm);
                }
                //LOGS.Trace();
                Console.ReadLine();
                do
                {
                    while (bf.getUnits.Count < raidCount + (BFConst.currentUnitID / 40 + 1) * raidCount)
                    {
                        bf.addUnit(new PBarbarian(
                                       (rnd.Next(2) == 0) ?
                                       new Point(rnd.Next(Calculator.FieldSize), rnd.Next(2) * (Calculator.FieldSize - 2) + 1)
                                    : new Point(rnd.Next(2) * (Calculator.FieldSize - 2) + 1, rnd.Next(Calculator.FieldSize))));
                    }

                    bf.CalculateMovementForEachCharacter();
                    bf.TraceHealth();
                    //for (int i = 0; i < bf.getUnits.Count; i++, Console.WriteLine(bf.getUnits[i-1].TraceBars())) ;
                    LOGS.Trace();
                    //LOGS.Trace("died|joined");
                    //string S = Console.ReadLine();
                    Console.ReadKey();
                } while (bf.SummHPteam(1) > 0);
                LOGS.Trace();
                Console.ReadLine();
            }
        }
コード例 #8
0
 public ServicePrefix1()
 {
     daoTXF         = new TXF();
     daoLOGSP       = new LOGSP();
     daoLOGS        = new LOGS();
     daoTXEMAIL     = new TXEMAIL();
     daoTXF1        = new TXF1();
     daoTXF2        = new TXF2();
     daoJRF         = new JRF();
     daoOCF         = new OCF();
     serviceCommon  = new ServiceCommon();
     daoFutAHOCFUPD = new OCFUPD("futAH");
     daoOptAHOCFUPD = new OCFUPD("optAH");
 }
コード例 #9
0
 public override void AfterAttacked(Iunit bywho)
 {
     base.AfterAttacked(bywho);
     if (this.DistanceTo((Abstraceunit)bywho, false) <= 1)
     {
         int dmg_buff = -(_att_dmg + _att_dmg_mod) / 2;
         _att_dmg_mod += dmg_buff;
         LOGS.Add(String.Format("{0} counterattacked {1} for {2} DMG!", this.NameFull, bywho.NameFull, CurrentDamage));
         if (CurrentDamage > 10 && !bywho.isDead)
         {
             this.Attack((Abstraceunit)bywho);
         }
         _att_dmg -= dmg_buff;
     }
 }
コード例 #10
0
ファイル: LogViewBll.cs プロジェクト: amuthagan/Invoic
        //end

        public bool SaveLog(string partno, string sheet_accessed)
        {
            LOGS logs = new LOGS();

            try
            {
                string hostname        = Dns.GetHostName();
                string ipaddress       = Dns.GetHostByName(hostname).AddressList[0].ToString();
                string userInformation = _userInformation.UserName;
                try
                {
                    logs           = new LOGS();
                    logs.UNAME     = userInformation;
                    logs.IPADDRESS = ipaddress;
                    logs.ACC_DATE  = String.Format("{0:d/M/yyyy HH:mm:ss tt}", _userInformation.Dal.ServerDateTime); //original

                    logs.PART_NO        = partno;
                    logs.SHEET_ACCESSED = sheet_accessed;
                    DB.LOGS.InsertOnSubmit(logs);
                    DB.SubmitChanges();
                    return(true);
                }
                catch (Exception ex)
                {
                    ex.LogException();
                    DB.LOGS.DeleteOnSubmit(logs);
                }
            }
            catch (System.Data.Linq.ChangeConflictException)
            {
                DB.ChangeConflicts.ResolveAll(System.Data.Linq.RefreshMode.KeepChanges);
            }
            catch (Exception ex)
            {
                ex.LogException();
                DB.LOGS.Context.Refresh(System.Data.Linq.RefreshMode.OverwriteCurrentValues, logs);
            }
            return(true);
        }
コード例 #11
0
        } //return value of chosen structure

        private void AppendLog(string s)
        {
            LOGS.AppendText(s + "\n");
            LOGS.ScrollToEnd();
        }
コード例 #12
0
 public virtual void Dissaply()
 {
     LOGS.Add(String.Format("{0} loosed \"{1}\" buff from {2}", _bufftarget.NameFull, _buffname, _buffhost.NameFull));
     _bufftarget = _buffhost = null;
 }
コード例 #13
0
 public virtual void ApplyFor(Abstraceunit who, Abstraceunit bywho)
 {
     _bufftarget = who;
     _buffhost   = bywho;
     LOGS.Add(String.Format("{0} recieved \"{1}\" buff from {2}", _bufftarget.NameFull, _buffname, _buffhost.NameFull));
 }