Beispiel #1
0
 public MonsterPattern()
 {
     Senses        = new MonsterSenses();
     SavingThrows  = new MonsterSavingThrows();
     Defenses      = new MonsterDefense();
     AbilityScores = new MonsterAbilityScores();
     Skills        = new MonsterSkills();
     Languages     = new MonsterLanguages();
     Alignment     = new MonsterAlignment();
     Movement      = new MonsterMovement();
     Powers        = new MonsterPowers();
     Feats         = new MonsterFeats();
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     Monster = new Golblin(MonsterName, Gender, Race, Level,
                           Force_attack, Force_defense, Force_hit, Force_critical, Force_Probability,
                           Magic_attack, Magic_defense, Magic_hit, Magic_critical, Magic_Probability,
                           Health, Magic, Move_speed, Dodge, Health, Magic);
     AllSkills = new SkillManager[MonsterSkills.childCount];
     for (int i = 0; i < MonsterSkills.childCount; i++)
     {
         AllSkills[i] = MonsterSkills.GetChild(i).GetComponent <SkillManager>();
     }
     Monster.OnHealthChange = OnHealthChange;
     Monster.OnMagicChange  = OnMagicChange;
     Monster.Dead           = DropItem;
     Monster.Dead          += MonsterDead;
     OnHealthChange(Monster.Current_health, Health);
     OnMagicChange(Monster.Current_magic, Magic);
 }
Beispiel #3
0
        private static void SaveZippedPatch(string path, Context destinationContext)
        {
            using (ZipOutputStream stream = new ZipOutputStream(File.Open(path, FileMode.Create, FileAccess.ReadWrite)))
            {
                const string fileVersion = "1.0";
                bool         psp         = destinationContext == Context.US_PSP;

                WriteFileToZip(stream, "version", Encoding.UTF8.GetBytes(fileVersion));
                WriteFileToZip(stream, "type", Encoding.UTF8.GetBytes(destinationContext.ToString()));

                WriteFileToZip(stream, elementNames[ElementName.Abilities], Abilities.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.AbilityAnimations], AbilityAnimations.ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.AbilityEffects], Abilities.ToEffectsByteArray());
                WriteFileToZip(stream, elementNames[ElementName.ItemAbilityEffects], Abilities.ToItemEffectsByteArray());
                WriteFileToZip(stream, elementNames[ElementName.ReactionAbilityEffects], Abilities.ToReactionEffectsByteArray());
                WriteFileToZip(stream, elementNames[ElementName.Items], Items.ToFirstByteArray());
                WriteFileToZip(stream, elementNames[ElementName.ItemAttributes], ItemAttributes.ToFirstByteArray());
                if (psp && Context == Context.US_PSP)
                {
                    WriteFileToZip(stream, elementNames[ElementName.PSPItems], Items.ToSecondByteArray());
                    WriteFileToZip(stream, elementNames[ElementName.PSPItemAttributes], ItemAttributes.ToSecondByteArray());
                    WriteFileToZip(stream, elementNames[ElementName.ENTD5], ENTDs.PSPEventsToByteArray());
                }
                WriteFileToZip(stream, elementNames[ElementName.Jobs], Jobs.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.JobLevels], JobLevels.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.MonsterSkills], MonsterSkills.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.SkillSets], SkillSets.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.ActionMenus], ActionMenus.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.StatusAttributes], StatusAttributes.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.InflictStatuses], InflictStatuses.ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.Poaching], PoachProbabilities.ToByteArray(destinationContext));
                WriteFileToZip(stream, elementNames[ElementName.ENTD1], ENTDs.ENTDs[0].ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.ENTD2], ENTDs.ENTDs[1].ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.ENTD3], ENTDs.ENTDs[2].ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.ENTD4], ENTDs.ENTDs[3].ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.MoveFindItems], MoveFind.ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.StoreInventories], StoreInventories.ToByteArray());
                WriteFileToZip(stream, elementNames[ElementName.Propositions], Propositions.ToByteArray());
                if (!AllPropositions.CanFixBuggyLevelBonuses(destinationContext))
                {
                    WriteFileToZip(stream, "BuggyPropositions", new byte[0]);
                }
            }
        }