Commit 3c82d3ecb35193ec986d6ce312c160c5e2df94a5

Authored by dg
1 parent 3db7fb8e

Give random lore a specific definition in loot tables so that it will drop more often


git-svn-id: http://svn.net-core.org/repos/t-engine4@3143 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -630,6 +630,7 @@ local drop_tables = {
630 630 ego = 45,
631 631 basic = 20,
632 632 money = 7,
  633 + lore = 5,
633 634 },
634 635 [2] = {
635 636 uniques = 0.7,
... ... @@ -640,6 +641,7 @@ local drop_tables = {
640 641 ego = 30,
641 642 basic = 15,
642 643 money = 8,
  644 + lore = 6,
643 645 },
644 646 [3] = {
645 647 uniques = 1,
... ... @@ -650,6 +652,7 @@ local drop_tables = {
650 652 ego = 15,
651 653 basic = 10,
652 654 money = 8.5,
  655 + lore = 6.5,
653 656 },
654 657 [4] = {
655 658 uniques = 1.1,
... ... @@ -660,6 +663,7 @@ local drop_tables = {
660 663 ego = 5,
661 664 basic = 5,
662 665 money = 8,
  666 + lore = 6,
663 667 },
664 668 [5] = {
665 669 uniques = 1.2,
... ... @@ -670,6 +674,7 @@ local drop_tables = {
670 674 ego = 5,
671 675 basic = 5,
672 676 money = 8,
  677 + lore = 6,
673 678 },
674 679 },
675 680 store = {
... ... @@ -682,6 +687,7 @@ local drop_tables = {
682 687 ego = 10,
683 688 basic = 0,
684 689 money = 0,
  690 + lore = 0,
685 691 },
686 692 [2] = {
687 693 uniques = 0.5,
... ... @@ -692,6 +698,7 @@ local drop_tables = {
692 698 ego = 8,
693 699 basic = 0,
694 700 money = 0,
  701 + lore = 0,
695 702 },
696 703 [3] = {
697 704 uniques = 0.5,
... ... @@ -702,6 +709,7 @@ local drop_tables = {
702 709 ego = 6,
703 710 basic = 0,
704 711 money = 0,
  712 + lore = 0,
705 713 },
706 714 [4] = {
707 715 uniques = 0.5,
... ... @@ -712,6 +720,7 @@ local drop_tables = {
712 720 ego = 4,
713 721 basic = 0,
714 722 money = 0,
  723 + lore = 0,
715 724 },
716 725 [5] = {
717 726 uniques = 0.5,
... ... @@ -722,6 +731,7 @@ local drop_tables = {
722 731 ego = 0,
723 732 basic = 0,
724 733 money = 0,
  734 + lore = 0,
725 735 },
726 736 },
727 737 boss = {
... ... @@ -734,6 +744,7 @@ local drop_tables = {
734 744 ego = 0,
735 745 basic = 0,
736 746 money = 4,
  747 + lore = 0,
737 748 },
738 749 [2] = {
739 750 uniques = 4,
... ... @@ -744,6 +755,7 @@ local drop_tables = {
744 755 ego = 0,
745 756 basic = 0,
746 757 money = 4,
  758 + lore = 0,
747 759 },
748 760 [3] = {
749 761 uniques = 5,
... ... @@ -754,6 +766,7 @@ local drop_tables = {
754 766 ego = 0,
755 767 basic = 0,
756 768 money = 4,
  769 + lore = 0,
757 770 },
758 771 [4] = {
759 772 uniques = 6,
... ... @@ -764,6 +777,7 @@ local drop_tables = {
764 777 ego = 0,
765 778 basic = 0,
766 779 money = 4,
  780 + lore = 0,
767 781 },
768 782 [5] = {
769 783 uniques = 7,
... ... @@ -774,6 +788,7 @@ local drop_tables = {
774 788 ego = 0,
775 789 basic = 0,
776 790 money = 4,
  791 + lore = 0,
777 792 },
778 793 },
779 794 }
... ... @@ -788,6 +803,7 @@ local loot_mod = {
788 803 ego = 0,
789 804 basic = 0,
790 805 money = 0,
  806 + lore = 0,
791 807 },
792 808 gvault = { -- Greater vault
793 809 uniques = 10,
... ... @@ -798,6 +814,7 @@ local loot_mod = {
798 814 ego = 0,
799 815 basic = 0,
800 816 money = 0,
  817 + lore = 0,
801 818 },
802 819 vault = { -- Default vault
803 820 uniques = 5,
... ... @@ -808,6 +825,7 @@ local loot_mod = {
808 825 ego = 0,
809 826 basic = 0,
810 827 money = 0,
  828 + lore = 0,
811 829 },
812 830 }
813 831
... ... @@ -857,7 +875,8 @@ function _M:entityFilterAlter(zone, level, type, filter)
857 875 local de = g + (t.double_ego or 0)
858 876 local e = de + (t.ego or 0)
859 877 local m = e + (t.money or 0)
860   - local total = m + (t.basic or 0)
  878 + local l = m + (t.lore or 0)
  879 + local total = l + (t.basic or 0)
861 880
862 881 local r = rng.float(0, total)
863 882 if r < u then
... ... @@ -900,6 +919,10 @@ function _M:entityFilterAlter(zone, level, type, filter)
900 919 print("[TOME ENTITY FILTER] selected Money", r, m)
901 920 filter.special = function(e) return e.type == "money" or e.type == "gem" end
902 921
  922 + elseif r < l then
  923 + print("[TOME ENTITY FILTER] selected Lore", r, m)
  924 + filter.special = function(e) return e.lore and true or false end
  925 +
903 926 else
904 927 print("[TOME ENTITY FILTER] selected basic", r, total)
905 928 filter.not_properties = filter.not_properties or {}
... ...
No preview for this file type
No preview for this file type