コード例 #1
0
    public Action_ChopTree()
    {
        Init();
        actionID = "ChopTree";

        VariationData ironAxe = new VariationData();

        ironAxe.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.IronAxe);
        ironAxe.AddRequiredWorldState(WorldStateKey.bIsTreeAvailable, 1);
        ironAxe.AddSatisfyWorldState(WorldStateKey.eHasItem, (int)ItemType.Log);
        ironAxe.benefitingSkill = Skills.WoodCutting;
        ironAxe.workCost        = 4f;
        ironAxe.range           = 1f;
        variations.Add(ironAxe);

        VariationData stoneAxe = new VariationData();

        stoneAxe.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.StoneAxe);
        stoneAxe.AddRequiredWorldState(WorldStateKey.bIsTreeAvailable, 1);
        stoneAxe.AddSatisfyWorldState(WorldStateKey.eHasItem, (int)ItemType.Log);
        stoneAxe.benefitingSkill = Skills.WoodCutting;
        stoneAxe.workCost        = 12f;
        stoneAxe.range           = 1f;
        variations.Add(stoneAxe);
    }
コード例 #2
0
    public Action_MakeAxe()
    {
        Init();
        actionID = "MakeAxe";


        VariationData ironAxe = new VariationData();

        ironAxe.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.Iron);
        ironAxe.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.Wood);
        ironAxe.AddSatisfyWorldState(WorldStateKey.eHasItem, (int)ItemType.IronAxe);
        ironAxe.benefitingSkill = Skills.Smithing;
        ironAxe.workCost        = 1f;
        ironAxe.range           = 1f;
        variations.Add(ironAxe);

        VariationData stoneAxe = new VariationData();

        stoneAxe.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.Stone);
        stoneAxe.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.Wood);
        stoneAxe.AddSatisfyWorldState(WorldStateKey.eHasItem, (int)ItemType.StoneAxe);
        stoneAxe.workCost = 4f;
        stoneAxe.range    = 1f;
        variations.Add(stoneAxe);
    }
コード例 #3
0
    public Action_MineIron()
    {
        Init();
        actionID = "MineIron";

        VariationData ironPick = new VariationData();

        ironPick.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.IronPickaxe);
        ironPick.AddSatisfyWorldState(WorldStateKey.eHasItem, (int)ItemType.Iron);
        ironPick.workCost = 5f;
        ironPick.range    = 1f;
        variations.Add(ironPick);

        VariationData stonePick = new VariationData();

        stonePick.AddRequiredWorldState(WorldStateKey.eHasItem, (int)ItemType.StoneAxe);
        stonePick.AddSatisfyWorldState(WorldStateKey.eHasItem, (int)ItemType.Iron);
        stonePick.workCost = 15f;
        stonePick.range    = 1f;
        variations.Add(stonePick);
    }